summaryrefslogtreecommitdiffstats
path: root/platform-logic
diff options
context:
space:
mode:
Diffstat (limited to 'platform-logic')
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_api-contrail-route-topology-operation-delete.json2
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_getpathsegment-create-composite-path.json2
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-assign.json2
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_api-contrail-route-topology-operation-delete.xml8
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_getpathsegment-create-composite-path.xml2
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml387
6 files changed, 205 insertions, 198 deletions
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_api-contrail-route-topology-operation-delete.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_api-contrail-route-topology-operation-delete.json
index c3494662..2567185d 100644
--- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_api-contrail-route-topology-operation-delete.json
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_api-contrail-route-topology-operation-delete.json
@@ -1 +1 @@
-[{"id":"61a70c97.efc834","type":"dgstart","name":"DGSTART","outputs":1,"x":161.00390625,"y":105.00390625,"z":"acd0c78c.bb62e8","wires":[["73f36b80.f8a324"]]},{"id":"73f36b80.f8a324","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":307.2419891357422,"y":179.95629978179932,"z":"acd0c78c.bb62e8","wires":[["e68bdf6.a51192"]]},{"id":"e68bdf6.a51192","type":"method","name":"api-contrail-route-topology-operation-delete","xml":"<method rpc='api-contrail-route-topology-operation-delete' mode='sync'>\n","comments":"","outputs":1,"x":390.15875244140625,"y":251.19435119628906,"z":"acd0c78c.bb62e8","wires":[["68557c6f.3d98b4"]]},{"id":"68557c6f.3d98b4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":295.4800910949707,"y":392.527690410614,"z":"acd0c78c.bb62e8","wires":[["4dccc38d.50c1ec","77305c3a.fe80b4","1f152a99.aefc55","8defc197.03c7a","9837507d.5e562","9a411e15.bf46b","3de233c4.6fac7c","43cb307a.cfcb8","f05071e8.780e8","e593c8f2.2a5ff8","5abb2222.b9ba9c","dedf0ab6.f5b128","cde9b970.2c92c8","ad4477f0.5d3e18","3ece0b18.49a894","7037b385.0ac9bc","ee15fb5f.5b4598","afb658db.c39db8","ab27f8b1.93ed18","4a8ac268.7ab68c"]]},{"id":"77305c3a.fe80b4","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":537.4405555725098,"y":2056.218755722046,"z":"acd0c78c.bb62e8","wires":[]},{"id":"4dccc38d.50c1ec","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":573.9722633361816,"y":1942.0079102516174,"z":"acd0c78c.bb62e8","wires":[]},{"id":"1f152a99.aefc55","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":645.2196044921875,"y":877.513220667839,"z":"acd0c78c.bb62e8","wires":[[]]},{"id":"9837507d.5e562","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":647.85595703125,"y":1016.5745363235474,"z":"acd0c78c.bb62e8","wires":[["1661bdc8.0a2b92","975f2e0a.d7a79"]]},{"id":"8defc197.03c7a","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=\"`$cto-api.contrail-route-allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":617.0688018798828,"y":909.5211448669434,"z":"acd0c78c.bb62e8","wires":[[]]},{"id":"1661bdc8.0a2b92","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":899.8187484741211,"y":1016.27126121521,"z":"acd0c78c.bb62e8","wires":[["e698baad.280c78"]]},{"id":"9a411e15.bf46b","type":"execute","name":"execute RestApiCallNode - DELETE 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='DELETE' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":637.0808944702148,"y":1895.1048922538757,"z":"acd0c78c.bb62e8","wires":[["a39d7238.5addd","f12b94d3.d7c948","ccc9df04.890e"]]},{"id":"a39d7238.5addd","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":907.3889122009277,"y":1948.1030930504203,"z":"acd0c78c.bb62e8","wires":[["4545393.1007bc8"]]},{"id":"f12b94d3.d7c948","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":898.3889617919922,"y":1916.6031187996268,"z":"acd0c78c.bb62e8","wires":[["4545393.1007bc8"]]},{"id":"ccc9df04.890e","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":902.1389999389648,"y":1886.9602236747742,"z":"acd0c78c.bb62e8","wires":[["8d97422c.4c6cb"]]},{"id":"4545393.1007bc8","type":"returnFailure","name":"return failure","xml":"<return 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":1068.1389999389648,"y":1917.3531426414847,"z":"acd0c78c.bb62e8","wires":[]},{"id":"e698baad.280c78","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1068.8187522888184,"y":1016.771162033081,"z":"acd0c78c.bb62e8","wires":[["800ee936.b357a8"]]},{"id":"800ee936.b357a8","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1280.787094116211,"y":1016.1680688858032,"z":"acd0c78c.bb62e8","wires":[["da78c574.203dc8","82434a72.be2b18"]]},{"id":"da78c574.203dc8","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1469.0093002319336,"y":1015.3902492523193,"z":"acd0c78c.bb62e8","wires":[["880f9967.435d78"]]},{"id":"9fa15375.21583","type":"set","name":"set ar from get","xml":"<set>\n<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />\n","comments":"","x":1873.3111991882324,"y":1048.961757659912,"z":"acd0c78c.bb62e8","wires":[]},{"id":"880f9967.435d78","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1653.5331897735596,"y":1015.2950830459595,"z":"acd0c78c.bb62e8","wires":[["9fa15375.21583","39470ed.b4c13f2"]]},{"id":"600fa9.8962e058","type":"comment","name":"GET allotted-resource from mdsal","info":"","comments":"","x":628.9297943115234,"y":981.660099029541,"z":"acd0c78c.bb62e8","wires":[]},{"id":"39470ed.b4c13f2","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":1961.1682510375977,"y":1015.7712497711182,"z":"acd0c78c.bb62e8","wires":[]},{"id":"9efe32c3.53db7","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":590.1838531494141,"y":842.4615592956543,"z":"acd0c78c.bb62e8","wires":[]},{"id":"8d97422c.4c6cb","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1043.7949676513672,"y":1883.1523928642273,"z":"acd0c78c.bb62e8","wires":[[]]},{"id":"11ed6847.6c3d48","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 in md-sal\" />\n \n","comments":"","x":1643.6708984375,"y":1116.670654296875,"z":"acd0c78c.bb62e8","wires":[]},{"id":"975f2e0a.d7a79","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":891.6705513000488,"y":1061.3373460769653,"z":"acd0c78c.bb62e8","wires":[["d1490590.66c948"]]},{"id":"d1490590.66c948","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1071.6705017089844,"y":1062.0038967132568,"z":"acd0c78c.bb62e8","wires":[["11ed6847.6c3d48"]]},{"id":"82434a72.be2b18","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1457.3372535705566,"y":1061.6706094741821,"z":"acd0c78c.bb62e8","wires":[["11ed6847.6c3d48"]]},{"id":"5e073c9a.767304","type":"comment","name":"Need to rollback aai here","info":"","comments":"","x":1294.21826171875,"y":1916.6707377433777,"z":"acd0c78c.bb62e8","wires":[]},{"id":"3de233c4.6fac7c","type":"update","name":"delete AAI allotted-resource","xml":"<delete 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 = $cto-api.contrail-route-allotted-resource-id\">\n\n","comments":"","outputs":1,"x":601.3293151855469,"y":1425.4483642578125,"z":"acd0c78c.bb62e8","wires":[["72c218dc.e955e8","c8538b20.b36578"]]},{"id":"72c218dc.e955e8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":854.9801177978516,"y":1403.908872127533,"z":"acd0c78c.bb62e8","wires":[["9f923a84.255f98"]]},{"id":"c8538b20.b36578","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":860.2895469665527,"y":1439.4802899360657,"z":"acd0c78c.bb62e8","wires":[["9f923a84.255f98"]]},{"id":"9f923a84.255f98","type":"returnFailure","name":"return failure","xml":"<return 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":1070.0753326416016,"y":1405.527916431427,"z":"acd0c78c.bb62e8","wires":[]},{"id":"94f72e7.09c52d","type":"comment","name":"Update AAI AR","info":"","comments":"","x":562.5610427856445,"y":1390.0991415977478,"z":"acd0c78c.bb62e8","wires":[]},{"id":"43cb307a.cfcb8","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":583.8134613037109,"y":1064.7976627349854,"z":"acd0c78c.bb62e8","wires":[]},{"id":"dd2f0fb4.446b5","type":"comment","name":"Call contrail api here","info":"","comments":"","x":585.0118789672852,"y":1144.4483318328857,"z":"acd0c78c.bb62e8","wires":[]},{"id":"f05071e8.780e8","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='`$cto-api.cloud-region-id`' />\n<parameter name='default-project' value='`$cto-api.default-project`' />\n<parameter name='default-domain' value='`$cto-api.default-domain`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n\n","comments":"","outputs":1,"x":657.0197906494141,"y":1176.4247907102108,"z":"acd0c78c.bb62e8","wires":[["36885bb9.ecffb4","9c0c9f05.069f8","ae08dc29.839a9"]]},{"id":"36885bb9.ecffb4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":958.4007415771484,"y":1142.4559761621058,"z":"acd0c78c.bb62e8","wires":[["f8c315fc.947f48"]]},{"id":"9c0c9f05.069f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":959.8293991088867,"y":1213.2336769104004,"z":"acd0c78c.bb62e8","wires":[["96604a61.b70c28"]]},{"id":"96604a61.b70c28","type":"returnFailure","name":"return failure","xml":"<return 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":1107.511875152588,"y":1211.4559516906738,"z":"acd0c78c.bb62e8","wires":[]},{"id":"f8c315fc.947f48","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1110.5912246704102,"y":1143.1227011680603,"z":"acd0c78c.bb62e8","wires":[[]]},{"id":"cbf2095a.459bd8","type":"comment","name":"Delete network policy in AAI","info":"","comments":"","x":601.559455871582,"y":1259.0039682388306,"z":"acd0c78c.bb62e8","wires":[]},{"id":"e593c8f2.2a5ff8","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":616.9363403320312,"y":1295.071533203125,"z":"acd0c78c.bb62e8","wires":[["2b7b8642.61c14a","aea7e9d.fa22618"]]},{"id":"2eda7861.67cc88","type":"returnFailure","name":"return failure","xml":"<return 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":1089.2818489074707,"y":1286.3531465530396,"z":"acd0c78c.bb62e8","wires":[]},{"id":"2b7b8642.61c14a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":860.7104568481445,"y":1285.368884086609,"z":"acd0c78c.bb62e8","wires":[["2eda7861.67cc88"]]},{"id":"aea7e9d.fa22618","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":864.5199546813965,"y":1314.8453006744385,"z":"acd0c78c.bb62e8","wires":[["2eda7861.67cc88"]]},{"id":"d153dfd9.6ceb","type":"comment","name":"Parameters","info":"INPUT:\ncto-api.default-domain\ncto-api.default-project\ncto-api.cloud-region-id\ncto-api.contrail-route-allotted-resource-id\ncto-api.rollback-flag\ncto-api.configuration-id\n","comments":"","x":425.3372497558594,"y":101.33724212646484,"z":"acd0c78c.bb62e8","wires":[]},{"id":"5abb2222.b9ba9c","type":"configure","name":"set default values","xml":"<set>\n<parameter name=\"ctotmp.action\" value=\"delete\" />\n<parameter name=\"ctotmp.config-count\" value=\"0\" />\n<parameter name=\"ctotmp.config-found\" value=\"true\" />","comments":"","outputs":1,"x":601.8927230834961,"y":391.00390815734863,"z":"acd0c78c.bb62e8","wires":[[]]},{"id":"dedf0ab6.f5b128","type":"call","name":"call validate-api-contrail-route-input","xml":"<call module='GENERIC-RESOURCE-API' rpc='validate-api-contrail-route-input' mode='sync' >\n","comments":"","outputs":1,"x":654.1150207519531,"y":424.89282608032227,"z":"acd0c78c.bb62e8","wires":[[]]},{"id":"cde9b970.2c92c8","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.api-contrail-route-topology-operation-delete\"/>\n<parameter name='field3' value='cto-api.parent-service-instance-id' />\n<parameter name='field4' value='`$cto-api.parent-service-instance-id`' />\n<parameter name='field5' value='cto-api.default-domain' />\n<parameter name='field6' value='`$cto-api.default-domain`' />\n<parameter name='field7' value='cto-api.port-mirror-configuration-instance-id' />\n<parameter name='field8' value='`$cto-api.port-mirror-configuration-instance-id`' />\n<parameter name='field9' value='cto-api.service-type' />\n<parameter name='field10' value='`$cto-api.service-type`' />\n<parameter name='field11' value='cto-api.source-network-role' />\n<parameter name='field12' value='`$cto-api.source-network-fole`' />\n<parameter name='field13' value='cto-api.collector-network-role' />\n<parameter name='field14' value='`$cto-api.collector-network-4ole`' />\n<parameter name='field15' value='cto-api.default-project' />\n<parameter name='field16' value='`$cto-api.default-project`' />\n<parameter name='field17' value='cto-api.cloud-region-id' />\n<parameter name='field18' value='`$cto-api.cloud-region-id`' />\n<parameter name='field19' value='cto-api.cloud-owner' />\n<parameter name='field20' value='`$cto-api.cloud-owner`' />\n<parameter name='field21' value='cto-api.isTest' />\n<parameter name='field22' value='`$cto-api.isTest`' />\n<parameter name='field23' value='service-data.service-information.global-customer-id' />\n<parameter name='field24' value='`$service-data.service-information.global-customer-id`' />\n","comments":"","outputs":1,"x":571.1150131225586,"y":324.0673894882202,"z":"acd0c78c.bb62e8","wires":[[]]},{"id":"3ece0b18.49a894","type":"update","name":"get AAI allotted-resource","xml":"<get-resource 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 = $cto-api.contrail-route-allotted-resource-id\"\n pfx='aai.ar' local-only='false' >\n\n","comments":"","outputs":1,"x":627.3054656982422,"y":498.5118417739868,"z":"acd0c78c.bb62e8","wires":[["daefeb15.c24db8","3fc58d3f.3e9ec2","4dba1ed0.34e1d"]]},{"id":"daefeb15.c24db8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":855.7658081054688,"y":500.3532962799072,"z":"acd0c78c.bb62e8","wires":[["e44d36ff.11d408"]]},{"id":"3fc58d3f.3e9ec2","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":866.6307067871094,"y":533.7024536132812,"z":"acd0c78c.bb62e8","wires":[["c1460143.958"]]},{"id":"e44d36ff.11d408","type":"returnFailure","name":"return failure","xml":"<return 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":1793.0832443237305,"y":496.41676330566406,"z":"acd0c78c.bb62e8","wires":[]},{"id":"ad4477f0.5d3e18","type":"configure","name":"clear internal data","xml":"<set>\n<parameter name=\"ctotmp.\" value=\"\" />\n","comments":"","outputs":1,"x":603.3372421264648,"y":354.78173065185547,"z":"acd0c78c.bb62e8","wires":[[]]},{"id":"b1f5380.5058ac8","type":"switchNode","name":"switch rollback-flag","xml":"<switch test='`$cto-api.rollback-flag`'>\n","comments":"","outputs":1,"x":1242.226173400879,"y":533.4483261108398,"z":"acd0c78c.bb62e8","wires":[["44f9073.69dd0f8","db2036f0.9f3f98"]]},{"id":"c1460143.958","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1038.8927993774414,"y":534.4483699798584,"z":"acd0c78c.bb62e8","wires":[["b1f5380.5058ac8"]]},{"id":"44f9073.69dd0f8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1427.7817115783691,"y":533.1149997711182,"z":"acd0c78c.bb62e8","wires":[["69bfd3fa.1266fc"]]},{"id":"677c1bb2.e607a4","type":"comment","name":"check if AR exists in AAI","info":"","comments":"","x":622.2261276245117,"y":460.8928050994873,"z":"acd0c78c.bb62e8","wires":[]},{"id":"db2036f0.9f3f98","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1432.2260208129883,"y":565.3371620178223,"z":"acd0c78c.bb62e8","wires":[["e44d36ff.11d408"]]},{"id":"7037b385.0ac9bc","type":"for","name":"for relationship list","xml":"<for silentFailure='true' index='ridx' start='0' end=\"`$aai.ar.relationship-list.relationship_length`\" >\n","comments":"","outputs":1,"x":588.3372192382812,"y":693.7896327972412,"z":"acd0c78c.bb62e8","wires":[["ac766870.610d88"]]},{"id":"6738258f.ebb92c","type":"switchNode","name":"switch","xml":"<switch test='`$aai.ar.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-key`'>\n","comments":"","outputs":1,"x":989.3923759460449,"y":696.3926191329956,"z":"acd0c78c.bb62e8","wires":[["d94e5918.3adb18"]]},{"id":"ac766870.610d88","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":804.5869674682617,"y":694.753867149353,"z":"acd0c78c.bb62e8","wires":[["6738258f.ebb92c"]]},{"id":"d94e5918.3adb18","type":"other","name":"configuration.configuration-id","xml":"<outcome value='configuration.configuration-id'>\n","comments":"","outputs":1,"x":1214.114631652832,"y":697.0314674377441,"z":"acd0c78c.bb62e8","wires":[["e843c380.38e87"]]},{"id":"e843c380.38e87","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1437.9755783081055,"y":697.0037984848022,"z":"acd0c78c.bb62e8","wires":[["7ec5d4de.1b732c","5e618e69.a6b5c"]]},{"id":"7ec5d4de.1b732c","type":"switchNode","name":"switch relationship_value","xml":"<switch test='`$aai.ar.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-value == $cto-api.configuration-id`'>\n","comments":"","outputs":1,"x":1665.5596008300781,"y":734.0038890838623,"z":"acd0c78c.bb62e8","wires":[["7b706944.bee888"]]},{"id":"5e618e69.a6b5c","type":"set","name":"increment config count","xml":"<set>\n<parameter name='ctotmp.config-count' value='`$ctotmp.config-count+1`' />\n","comments":"","x":1660.0039367675781,"y":698.6705403327942,"z":"acd0c78c.bb62e8","wires":[]},{"id":"7b706944.bee888","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1888.78173828125,"y":733.4483642578125,"z":"acd0c78c.bb62e8","wires":[["618b247f.ec0adc"]]},{"id":"1b0a300d.af90e","type":"set","name":"set config found","xml":"<set>\n<parameter name='ctotmp.config-found' value='true' />\n","comments":"","x":2247.6707496643066,"y":733.2261562347412,"z":"acd0c78c.bb62e8","wires":[]},{"id":"618b247f.ec0adc","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2049.892749786377,"y":733.2261476516724,"z":"acd0c78c.bb62e8","wires":[["1b0a300d.af90e"]]},{"id":"ee15fb5f.5b4598","type":"switchNode","name":"switch config count is 1 and found is true","xml":"<switch test=\"`$ctotmp.config-count == 1 and $ctotmp.config-found == 'true'`\">\n","comments":"","outputs":1,"x":650.2895660400391,"y":796.3689441680908,"z":"acd0c78c.bb62e8","wires":[["e3751519.b5fa78","2532dd48.58b4c2"]]},{"id":"2532dd48.58b4c2","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":903.781689961751,"y":819.892750846015,"z":"acd0c78c.bb62e8","wires":[["4987883.5dcdb78"]]},{"id":"e3751519.b5fa78","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":901.5595092773438,"y":789.8927612304688,"z":"acd0c78c.bb62e8","wires":[["a47d6831.c78e18"]]},{"id":"4987883.5dcdb78","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1067.1149597167969,"y":818.7816028594971,"z":"acd0c78c.bb62e8","wires":[[]]},{"id":"3df15db8.b50a82","type":"comment","name":"check if there is > 1 relationship to configuration id for this AR","info":"","comments":"","x":711.1150360107422,"y":656.4483337402344,"z":"acd0c78c.bb62e8","wires":[]},{"id":"a47d6831.c78e18","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1066.0038375854492,"y":786.5594444274902,"z":"acd0c78c.bb62e8","wires":[["65ba4449.71906c"]]},{"id":"69bfd3fa.1266fc","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1591.114995956421,"y":534.2261009216309,"z":"acd0c78c.bb62e8","wires":[["6f25db72.fdc6e4"]]},{"id":"4dba1ed0.34e1d","type":"failure","name":"Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":863.337251663208,"y":564.2261352539062,"z":"acd0c78c.bb62e8","wires":[["737512e9.21501c"]]},{"id":"737512e9.21501c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1044.4483032226562,"y":563.114990234375,"z":"acd0c78c.bb62e8","wires":[[]]},{"id":"6f25db72.fdc6e4","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":1797.7816162109375,"y":530.8927612304688,"z":"acd0c78c.bb62e8","wires":[]},{"id":"ae08dc29.839a9","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":961.1150207519531,"y":1175.337381362915,"z":"acd0c78c.bb62e8","wires":[["f8c315fc.947f48"]]},{"id":"65ba4449.71906c","type":"returnFailure","name":"return failure","xml":"<return 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 Allotted resource is not tied to configuration object\" />\n","comments":"","x":1257.0039138793945,"y":786.0038928985596,"z":"acd0c78c.bb62e8","wires":[]},{"id":"4a8ac268.7ab68c","type":"switchNode","name":"switch config count is > 1","xml":"<switch test=\"`$ctotmp.config-count > 1`\">\n","comments":"","outputs":1,"x":604.00390625,"y":755.00390625,"z":"acd0c78c.bb62e8","wires":[["7ca6c92f.9d8cf8"]]},{"id":"7ca6c92f.9d8cf8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":816.00390625,"y":755.00390625,"z":"acd0c78c.bb62e8","wires":[["dd2966aa.9faf08"]]},{"id":"dd2966aa.9faf08","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":970.337158203125,"y":754.8927612304688,"z":"acd0c78c.bb62e8","wires":[["b64f1cd1.ca635"]]},{"id":"b64f1cd1.ca635","type":"returnFailure","name":"return failure","xml":"<return 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 Allotted Resource is tied to more than one configuration object\" />\n","comments":"","x":1162.22607421875,"y":755.1150512695312,"z":"acd0c78c.bb62e8","wires":[]},{"id":"80b1dad4.0b67a8","type":"for","name":"for snidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]","xml":"<for silentFailure='true' index='snidx' start='`$tmp.sdidx + 1`' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n","comments":"","outputs":1,"x":1651.7339401245117,"y":1792.003807067871,"z":"acd0c78c.bb62e8","wires":[["d3096568.793e08"]]},{"id":"ac7e844b.3ab3d8","type":"comment","name":"Remove CAR from service data","info":"","comments":"","x":610.7181777954102,"y":1643.6708612442017,"z":"acd0c78c.bb62e8","wires":[]},{"id":"afb658db.c39db8","type":"switchNode","name":"switch $service-data.consumed-allotted-resource.length","xml":"<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n","comments":"","outputs":1,"x":687.4839477539062,"y":1676.1234045028687,"z":"acd0c78c.bb62e8","wires":[["4e05c574.7f2a6c","7e94621b.90f6ec"]]},{"id":"4e05c574.7f2a6c","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1043.8647842407227,"y":1682.7898206710815,"z":"acd0c78c.bb62e8","wires":[["9470fb8c.394018"]]},{"id":"9df7ca02.4ab8a8","type":"set","name":"Remove AR","xml":"<set>\n\t<parameter name=\"service-data.consumed-allotted-resources.\" value=\"\"/>\n\n","comments":"","x":1432.039161682129,"y":1685.3455448150635,"z":"acd0c78c.bb62e8","wires":[]},{"id":"7e94621b.90f6ec","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1049.4520893096924,"y":1746.710368156433,"z":"acd0c78c.bb62e8","wires":[["d6dd9fbe.3094c"]]},{"id":"41dc3f34.bcd87","type":"set","name":"set new CAR length","xml":"<set>\n\t<parameter name=\"service-data.consumed-allotted-resources.consumed-allotted-resource_length\" value=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource_length - 1`\"/>\n\n\t\n","comments":"","x":1457.8594360351562,"y":1820.9962944984436,"z":"acd0c78c.bb62e8","wires":[]},{"id":"fb8c8284.58099","type":"set","name":"Remove CAR","xml":"<set>\n\t<parameter name=\"service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.new_length].\" value=\"\"/>\n\n","comments":"","x":1439.9280967712402,"y":1852.2975249290466,"z":"acd0c78c.bb62e8","wires":[]},{"id":"d6dd9fbe.3094c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1229.388557434082,"y":1748.027732849121,"z":"acd0c78c.bb62e8","wires":[["80b1dad4.0b67a8","fb8c8284.58099","41dc3f34.bcd87","11d3acc3.77f3e3"]]},{"id":"591202ad.d5cf3c","type":"set","name":"set new consumed allotted resource length","xml":"<set>\n\t<parameter name=\"service-data.consumed-allotted-resources.consumed-allotted-resource_length\" value=\"0\"/>\n\n\t\n","comments":"","x":1528.3726654052734,"y":1716.715853691101,"z":"acd0c78c.bb62e8","wires":[]},{"id":"9470fb8c.394018","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1223.198097229004,"y":1683.4936170578003,"z":"acd0c78c.bb62e8","wires":[["9df7ca02.4ab8a8","591202ad.d5cf3c"]]},{"id":"68ca596.6a009a8","type":"comment","name":"If only one remove all networks","info":"","comments":"","x":1115.2351455688477,"y":1647.3825941085815,"z":"acd0c78c.bb62e8","wires":[]},{"id":"11d3acc3.77f3e3","type":"set","name":"Set new length","xml":"<set>\n\t<parameter name=\"tmp.new_length\" value=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource_length - 1`\"/>\n\t\n\t\n","comments":"","x":1441.8064727783203,"y":1759.4776282310486,"z":"acd0c78c.bb62e8","wires":[]},{"id":"29d74fbe.37102","type":"set","name":"move CAR to remove one","xml":"<set>\n\t<parameter name=\"service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.newidx].\" value=\"$service-data.consumed-allotted-resources.consumed-allotted-resource[$snidx].\" />\n\t\n","comments":"","x":2318.5753860473633,"y":1817.7182006835938,"z":"acd0c78c.bb62e8","wires":[]},{"id":"d3096568.793e08","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2079.1311416625977,"y":1794.4959087371826,"z":"acd0c78c.bb62e8","wires":[["29d74fbe.37102","b6552632.ac4f58"]]},{"id":"b6552632.ac4f58","type":"set","name":"Set new index","xml":"<set>\n\t<parameter name=\"tmp.newidx\" value=\"`$snidx - 1`\"/>\n\t\n\t\n","comments":"","x":2282.723617553711,"y":1787.310863494873,"z":"acd0c78c.bb62e8","wires":[]},{"id":"ab27f8b1.93ed18","type":"for","name":"for snidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]","xml":"<for silentFailure='true' index='snidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n","comments":"","outputs":1,"x":755.71826171875,"y":1547.7180786132812,"z":"acd0c78c.bb62e8","wires":[["11bf7633.28d41a"]]},{"id":"11bf7633.28d41a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1191.686897277832,"y":1545.9244289398193,"z":"acd0c78c.bb62e8","wires":[["39cd84a6.e50b6c"]]},{"id":"39cd84a6.e50b6c","type":"switchNode","name":"switch AR found","xml":"<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource[$sdix].allotted-resource-id == $cto-api.contrail-route-allotted-resource-id`'>\n","comments":"","outputs":1,"x":1394.2896156311035,"y":1546.2895069122314,"z":"acd0c78c.bb62e8","wires":[["63a8d9b7.9647c8"]]},{"id":"ed567b8f.022118","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1771.432518005371,"y":1544.8610582351685,"z":"acd0c78c.bb62e8","wires":[["cd740813.79bfd8","2e7160ae.30f4a"]]},{"id":"cd740813.79bfd8","type":"set","name":"Set sdidx","xml":"<set>\n\t<parameter name=\"tmp.sdidx\" value=\"`$snidx`\"/>\n\t\n\t\n","comments":"","x":1985.7182273864746,"y":1509.1468420028687,"z":"acd0c78c.bb62e8","wires":[]},{"id":"2e7160ae.30f4a","type":"break","name":"break","xml":"<break>\n","comments":"","x":1977.1467475891113,"y":1543.4325561523438,"z":"acd0c78c.bb62e8","wires":[]},{"id":"757a5151.5bcb2","type":"comment","name":"Find AR idx in consumed allotted resource list","info":"","comments":"","x":672.8610229492188,"y":1513.4324703216553,"z":"acd0c78c.bb62e8","wires":[]},{"id":"63a8d9b7.9647c8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1582.860969543457,"y":1544.8610758781433,"z":"acd0c78c.bb62e8","wires":[["ed567b8f.022118"]]}] \ No newline at end of file
+[{"id":"df974283.904838","type":"dgstart","name":"DGSTART","outputs":1,"x":311.75,"y":158.66666412353516,"z":"a04d05aa.96dde8","wires":[["3acfd36b.0baa74"]]},{"id":"3acfd36b.0baa74","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":457.9880828857422,"y":233.61905765533447,"z":"a04d05aa.96dde8","wires":[["9a66d8b7.be1fe8"]]},{"id":"9a66d8b7.be1fe8","type":"method","name":"api-contrail-route-topology-operation-delete","xml":"<method rpc='api-contrail-route-topology-operation-delete' mode='sync'>\n","comments":"","outputs":1,"x":540.9048461914062,"y":304.8571090698242,"z":"a04d05aa.96dde8","wires":[["73856450.29c29c"]]},{"id":"73856450.29c29c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":446.2261848449707,"y":446.19044828414917,"z":"a04d05aa.96dde8","wires":[["48e06f2b.f80d9","a42cbd9b.c72d78","390840cf.ea062","fdec1e33.2d584","4e7df2db.c66804","24e1937a.d92304","a5491397.e63d","b0e2fb65.4d72a8","5ff8263f.c34fe","37d8e562.438482","5cd931aa.cf1c9","f4ad5e9.3b0dd2","7eeb9c2a.4b203c","30ba6f49.d097d8","7bd3eb16.82f6d4","68d3b550.c2328c","a48b96ce.6aa88","bdea225f.6f7fc8","e717d7fd.25afe8","25bfe2f3.42be26"]]},{"id":"a42cbd9b.c72d78","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":688.1866493225098,"y":2109.881513595581,"z":"a04d05aa.96dde8","wires":[]},{"id":"48e06f2b.f80d9","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":724.7183570861816,"y":1995.6706681251526,"z":"a04d05aa.96dde8","wires":[]},{"id":"390840cf.ea062","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":795.9656982421875,"y":931.1759785413742,"z":"a04d05aa.96dde8","wires":[[]]},{"id":"4e7df2db.c66804","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":798.60205078125,"y":1070.2372941970825,"z":"a04d05aa.96dde8","wires":[["3e55c079.a5837","6436bb5b.c26b3c"]]},{"id":"fdec1e33.2d584","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=\"`$cto-api.contrail-route-allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":767.8148956298828,"y":963.1839027404785,"z":"a04d05aa.96dde8","wires":[[]]},{"id":"3e55c079.a5837","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1050.564842224121,"y":1069.9340190887451,"z":"a04d05aa.96dde8","wires":[["a646265f.47ea7"]]},{"id":"24e1937a.d92304","type":"execute","name":"execute RestApiCallNode - DELETE 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='DELETE' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":787.8269882202148,"y":1948.767650127411,"z":"a04d05aa.96dde8","wires":[["29da9919.d1d6b6","bdfa5346.70b88","6479a17.ea4a8e"]]},{"id":"29da9919.d1d6b6","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1058.1350059509277,"y":2001.7658509239554,"z":"a04d05aa.96dde8","wires":[["a652f709.2d7f38"]]},{"id":"bdfa5346.70b88","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1049.1350555419922,"y":1970.265876673162,"z":"a04d05aa.96dde8","wires":[["a652f709.2d7f38"]]},{"id":"6479a17.ea4a8e","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1052.8850936889648,"y":1940.6229815483093,"z":"a04d05aa.96dde8","wires":[["d4a11274.e8fd"]]},{"id":"a652f709.2d7f38","type":"returnFailure","name":"return failure","xml":"<return 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":1218.8850936889648,"y":1971.01590051502,"z":"a04d05aa.96dde8","wires":[]},{"id":"a646265f.47ea7","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1219.5648460388184,"y":1070.4339199066162,"z":"a04d05aa.96dde8","wires":[["8d7eabfa.167cc8"]]},{"id":"8d7eabfa.167cc8","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1431.533187866211,"y":1069.8308267593384,"z":"a04d05aa.96dde8","wires":[["d5a911b3.ffec88","cfb45605.4899b8"]]},{"id":"d5a911b3.ffec88","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1619.7553939819336,"y":1069.0530071258545,"z":"a04d05aa.96dde8","wires":[["6816e818.3220d"]]},{"id":"f2f09ff7.0045a","type":"set","name":"set ar from get","xml":"<set>\n<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />\n","comments":"","x":2024.0572929382324,"y":1102.6245155334473,"z":"a04d05aa.96dde8","wires":[]},{"id":"6816e818.3220d","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1804.2792835235596,"y":1068.9578409194946,"z":"a04d05aa.96dde8","wires":[["f2f09ff7.0045a","2304cd9.2986e32"]]},{"id":"6e1274a3.dd6cac","type":"comment","name":"GET allotted-resource from mdsal","info":"","comments":"","x":779.6758880615234,"y":1035.3228569030762,"z":"a04d05aa.96dde8","wires":[]},{"id":"2304cd9.2986e32","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":2111.9143447875977,"y":1069.4340076446533,"z":"a04d05aa.96dde8","wires":[]},{"id":"426e51cf.16c37","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":740.9299468994141,"y":896.1243171691895,"z":"a04d05aa.96dde8","wires":[]},{"id":"d4a11274.e8fd","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1194.5410614013672,"y":1936.8151507377625,"z":"a04d05aa.96dde8","wires":[[]]},{"id":"79d75df3.055734","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 in md-sal\" />\n \n","comments":"","x":1794.4169921875,"y":1170.3334121704102,"z":"a04d05aa.96dde8","wires":[]},{"id":"6436bb5b.c26b3c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1042.4166450500488,"y":1115.0001039505005,"z":"a04d05aa.96dde8","wires":[["2087473c.3ecd6"]]},{"id":"2087473c.3ecd6","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1222.4165954589844,"y":1115.666654586792,"z":"a04d05aa.96dde8","wires":[["79d75df3.055734"]]},{"id":"cfb45605.4899b8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1608.0833473205566,"y":1115.3333673477173,"z":"a04d05aa.96dde8","wires":[["79d75df3.055734"]]},{"id":"7531096a.c15c5","type":"comment","name":"Need to rollback aai here","info":"","comments":"","x":1444.96435546875,"y":1970.3334956169128,"z":"a04d05aa.96dde8","wires":[]},{"id":"a5491397.e63d","type":"update","name":"delete AAI allotted-resource","xml":"<delete 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 = $cto-api.contrail-route-allotted-resource-id\">\n\n","comments":"","outputs":1,"x":752.0754089355469,"y":1479.1111221313477,"z":"a04d05aa.96dde8","wires":[["e4bc276b.df95e","4d6316f5.70cf88"]]},{"id":"e4bc276b.df95e","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1005.7262115478516,"y":1457.5716300010681,"z":"a04d05aa.96dde8","wires":[["1207feb3.ce5da1"]]},{"id":"4d6316f5.70cf88","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1011.0356407165527,"y":1493.1430478096008,"z":"a04d05aa.96dde8","wires":[["1207feb3.ce5da1"]]},{"id":"1207feb3.ce5da1","type":"returnFailure","name":"return failure","xml":"<return 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":1220.8214263916016,"y":1459.1906743049622,"z":"a04d05aa.96dde8","wires":[]},{"id":"27d3b51a.5b1dc2","type":"comment","name":"Update AAI AR","info":"","comments":"","x":713.3071365356445,"y":1443.761899471283,"z":"a04d05aa.96dde8","wires":[]},{"id":"b0e2fb65.4d72a8","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":734.5595550537109,"y":1118.4604206085205,"z":"a04d05aa.96dde8","wires":[]},{"id":"5e880cbf.42aa6c","type":"comment","name":"Call contrail api here","info":"","comments":"","x":735.7579727172852,"y":1198.111089706421,"z":"a04d05aa.96dde8","wires":[]},{"id":"5ff8263f.c34fe","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='`$cto-api.cloud-region-id`' />\n<parameter name='default-project' value='`$cto-api.default-project`' />\n<parameter name='default-domain' value='`$cto-api.default-domain`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n\n","comments":"","outputs":1,"x":807.7658843994141,"y":1230.087548583746,"z":"a04d05aa.96dde8","wires":[["6114ce41.1008","212d8de4.467eaa","98d5c18b.8e5f8"]]},{"id":"6114ce41.1008","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1109.1468353271484,"y":1196.118734035641,"z":"a04d05aa.96dde8","wires":[["cc339bb2.32dc08"]]},{"id":"212d8de4.467eaa","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1110.5754928588867,"y":1266.8964347839355,"z":"a04d05aa.96dde8","wires":[["df1fe041.e9c678"]]},{"id":"df1fe041.e9c678","type":"returnFailure","name":"return failure","xml":"<return 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 delete policy in Contrail\" />\n","comments":"","x":1258.257968902588,"y":1265.118709564209,"z":"a04d05aa.96dde8","wires":[]},{"id":"cc339bb2.32dc08","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1261.3373184204102,"y":1196.7854590415955,"z":"a04d05aa.96dde8","wires":[[]]},{"id":"4a34e05d.2fb3d","type":"comment","name":"Delete network policy in AAI","info":"","comments":"","x":752.305549621582,"y":1312.6667261123657,"z":"a04d05aa.96dde8","wires":[]},{"id":"37d8e562.438482","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":767.6824340820312,"y":1348.7342910766602,"z":"a04d05aa.96dde8","wires":[["3a904ac8.8fe2f6","a8f8b714.3c2278"]]},{"id":"e3549d5e.09f13","type":"returnFailure","name":"return failure","xml":"<return 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 delete network policy in AAI\" />\n","comments":"","x":1240.0279426574707,"y":1340.0159044265747,"z":"a04d05aa.96dde8","wires":[]},{"id":"3a904ac8.8fe2f6","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1011.4565505981445,"y":1339.031641960144,"z":"a04d05aa.96dde8","wires":[["e3549d5e.09f13"]]},{"id":"a8f8b714.3c2278","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1015.2660484313965,"y":1368.5080585479736,"z":"a04d05aa.96dde8","wires":[["e3549d5e.09f13"]]},{"id":"9b7b36e7.031118","type":"comment","name":"Parameters","info":"INPUT:\ncto-api.default-domain\ncto-api.default-project\ncto-api.cloud-region-id\ncto-api.contrail-route-allotted-resource-id\ncto-api.rollback-flag\ncto-api.configuration-id\n","comments":"","x":576.0833435058594,"y":155,"z":"a04d05aa.96dde8","wires":[]},{"id":"5cd931aa.cf1c9","type":"configure","name":"set default values","xml":"<set>\n<parameter name=\"ctotmp.action\" value=\"delete\" />\n<parameter name=\"ctotmp.config-count\" value=\"0\" />\n<parameter name=\"ctotmp.config-found\" value=\"true\" />","comments":"","outputs":1,"x":752.6388168334961,"y":444.6666660308838,"z":"a04d05aa.96dde8","wires":[[]]},{"id":"f4ad5e9.3b0dd2","type":"call","name":"call validate-api-contrail-route-input","xml":"<call module='GENERIC-RESOURCE-API' rpc='validate-api-contrail-route-input' mode='sync' >\n","comments":"","outputs":1,"x":804.8611145019531,"y":478.5555839538574,"z":"a04d05aa.96dde8","wires":[[]]},{"id":"7eeb9c2a.4b203c","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.api-contrail-route-topology-operation-delete\"/>\n<parameter name='field3' value='cto-api.parent-service-instance-id' />\n<parameter name='field4' value='`$cto-api.parent-service-instance-id`' />\n<parameter name='field5' value='cto-api.default-domain' />\n<parameter name='field6' value='`$cto-api.default-domain`' />\n<parameter name='field7' value='cto-api.port-mirror-configuration-instance-id' />\n<parameter name='field8' value='`$cto-api.port-mirror-configuration-instance-id`' />\n<parameter name='field9' value='cto-api.service-type' />\n<parameter name='field10' value='`$cto-api.service-type`' />\n<parameter name='field11' value='cto-api.source-network-role' />\n<parameter name='field12' value='`$cto-api.source-network-fole`' />\n<parameter name='field13' value='cto-api.collector-network-role' />\n<parameter name='field14' value='`$cto-api.collector-network-4ole`' />\n<parameter name='field15' value='cto-api.default-project' />\n<parameter name='field16' value='`$cto-api.default-project`' />\n<parameter name='field17' value='cto-api.cloud-region-id' />\n<parameter name='field18' value='`$cto-api.cloud-region-id`' />\n<parameter name='field19' value='cto-api.cloud-owner' />\n<parameter name='field20' value='`$cto-api.cloud-owner`' />\n<parameter name='field21' value='cto-api.isTest' />\n<parameter name='field22' value='`$cto-api.isTest`' />\n<parameter name='field23' value='service-data.service-information.global-customer-id' />\n<parameter name='field24' value='`$service-data.service-information.global-customer-id`' />\n","comments":"","outputs":1,"x":721.8611068725586,"y":377.73014736175537,"z":"a04d05aa.96dde8","wires":[[]]},{"id":"7bd3eb16.82f6d4","type":"update","name":"get AAI allotted-resource","xml":"<get-resource 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 = $cto-api.contrail-route-allotted-resource-id\"\n pfx='aai.ar' local-only='false' >\n\n","comments":"","outputs":1,"x":778.0515594482422,"y":552.174599647522,"z":"a04d05aa.96dde8","wires":[["ee1b625f.50a488","56af5df.ef970a4","e2a7caea.66427"]]},{"id":"ee1b625f.50a488","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1006.5119018554688,"y":554.0160541534424,"z":"a04d05aa.96dde8","wires":[["e58a245b.cdd508"]]},{"id":"56af5df.ef970a4","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1017.3768005371094,"y":587.3652114868164,"z":"a04d05aa.96dde8","wires":[["65e4a356.63e61c"]]},{"id":"e58a245b.cdd508","type":"returnFailure","name":"return failure","xml":"<return 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":1943.8293380737305,"y":550.0795211791992,"z":"a04d05aa.96dde8","wires":[]},{"id":"30ba6f49.d097d8","type":"configure","name":"clear internal data","xml":"<set>\n<parameter name=\"ctotmp.\" value=\"\" />\n","comments":"","outputs":1,"x":754.0833358764648,"y":408.4444885253906,"z":"a04d05aa.96dde8","wires":[[]]},{"id":"39e90493.8f2e8c","type":"switchNode","name":"switch rollback-flag","xml":"<switch test='`$cto-api.rollback-flag`'>\n","comments":"","outputs":1,"x":1392.972267150879,"y":587.111083984375,"z":"a04d05aa.96dde8","wires":[["f5f6cee5.3320b","6b2175e6.b048a4"]]},{"id":"65e4a356.63e61c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1189.6388931274414,"y":588.1111278533936,"z":"a04d05aa.96dde8","wires":[["39e90493.8f2e8c"]]},{"id":"f5f6cee5.3320b","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1578.5278053283691,"y":586.7777576446533,"z":"a04d05aa.96dde8","wires":[["79da048c.853c24"]]},{"id":"dd4149ba.e84128","type":"comment","name":"check if AR exists in AAI","info":"","comments":"","x":772.9722213745117,"y":514.5555629730225,"z":"a04d05aa.96dde8","wires":[]},{"id":"6b2175e6.b048a4","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1582.9721145629883,"y":618.9999198913574,"z":"a04d05aa.96dde8","wires":[["e58a245b.cdd508"]]},{"id":"68d3b550.c2328c","type":"for","name":"for relationship list","xml":"<for silentFailure='true' index='ridx' start='0' end=\"`$aai.ar.relationship-list.relationship_length`\" >\n","comments":"","outputs":1,"x":739.0833129882812,"y":747.4523906707764,"z":"a04d05aa.96dde8","wires":[["1b43e690.d53209"]]},{"id":"ed5ea8c8.d68408","type":"switchNode","name":"switch","xml":"<switch test='`$aai.ar.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-key`'>\n","comments":"","outputs":1,"x":1140.138469696045,"y":750.0553770065308,"z":"a04d05aa.96dde8","wires":[["11abf495.9e996b"]]},{"id":"1b43e690.d53209","type":"for","name":"for relationship data","xml":"<for silentFailure='false' index='rdidx' start='0' end=\"`$aai.ar.relationship-list.relationship[$ridx].relationship-data_length`\" >\n","comments":"","outputs":1,"x":955.3330612182617,"y":748.4166250228882,"z":"a04d05aa.96dde8","wires":[["ed5ea8c8.d68408"]]},{"id":"11abf495.9e996b","type":"other","name":"configuration.configuration-id","xml":"<outcome value='configuration.configuration-id'>\n","comments":"","outputs":1,"x":1364.860725402832,"y":750.6942253112793,"z":"a04d05aa.96dde8","wires":[["aef97856.ce1b6"]]},{"id":"aef97856.ce1b6","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1588.7216720581055,"y":750.6665563583374,"z":"a04d05aa.96dde8","wires":[["da49b6ab.8f85f8","5294fcec.e89854"]]},{"id":"da49b6ab.8f85f8","type":"switchNode","name":"switch relationship_value","xml":"<switch test='`$aai.ar.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-value == $cto-api.configuration-id`'>\n","comments":"","outputs":1,"x":1816.3056945800781,"y":787.6666469573975,"z":"a04d05aa.96dde8","wires":[["83c2d256.3c16d"]]},{"id":"5294fcec.e89854","type":"set","name":"increment config count","xml":"<set>\n<parameter name='ctotmp.config-count' value='`$ctotmp.config-count+1`' />\n","comments":"","x":1810.7500305175781,"y":752.3332982063293,"z":"a04d05aa.96dde8","wires":[]},{"id":"83c2d256.3c16d","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2039.52783203125,"y":787.1111221313477,"z":"a04d05aa.96dde8","wires":[["9dbab233.06c6f"]]},{"id":"ba821080.6d606","type":"set","name":"set config found","xml":"<set>\n<parameter name='ctotmp.config-found' value='true' />\n","comments":"","x":2398.4168434143066,"y":786.8889141082764,"z":"a04d05aa.96dde8","wires":[]},{"id":"9dbab233.06c6f","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2200.638843536377,"y":786.8889055252075,"z":"a04d05aa.96dde8","wires":[["ba821080.6d606"]]},{"id":"a48b96ce.6aa88","type":"switchNode","name":"switch config count is 1 and found is true","xml":"<switch test=\"`$ctotmp.config-count == 1 and $ctotmp.config-found == 'true'`\">\n","comments":"","outputs":1,"x":801.0356597900391,"y":850.031702041626,"z":"a04d05aa.96dde8","wires":[["5497da6e.a8ab04","1eef5d93.dd9e2a"]]},{"id":"1eef5d93.dd9e2a","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1054.527783711751,"y":873.5555087195502,"z":"a04d05aa.96dde8","wires":[["31e92ab.8dfafd6"]]},{"id":"5497da6e.a8ab04","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1052.3056030273438,"y":843.5555191040039,"z":"a04d05aa.96dde8","wires":[["29500ab5.fd810e"]]},{"id":"31e92ab.8dfafd6","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1217.8610534667969,"y":872.4443607330322,"z":"a04d05aa.96dde8","wires":[[]]},{"id":"75ecc999.38973","type":"comment","name":"check if there is > 1 relationship to configuration id for this AR","info":"","comments":"","x":861.8611297607422,"y":710.1110916137695,"z":"a04d05aa.96dde8","wires":[]},{"id":"29500ab5.fd810e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1216.7499313354492,"y":840.2222023010254,"z":"a04d05aa.96dde8","wires":[["7a507900.94fec"]]},{"id":"79da048c.853c24","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1741.861089706421,"y":587.888858795166,"z":"a04d05aa.96dde8","wires":[["49e138a7.52ab1"]]},{"id":"e2a7caea.66427","type":"failure","name":"Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1014.083345413208,"y":617.8888931274414,"z":"a04d05aa.96dde8","wires":[["b2354214.a5c4e"]]},{"id":"b2354214.a5c4e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1195.1943969726562,"y":616.7777481079102,"z":"a04d05aa.96dde8","wires":[[]]},{"id":"49e138a7.52ab1","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":1948.5277099609375,"y":584.5555191040039,"z":"a04d05aa.96dde8","wires":[]},{"id":"98d5c18b.8e5f8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1111.8611145019531,"y":1229.0001392364502,"z":"a04d05aa.96dde8","wires":[["cc339bb2.32dc08"]]},{"id":"7a507900.94fec","type":"returnFailure","name":"return failure","xml":"<return 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 Allotted resource is not tied to configuration object\" />\n","comments":"","x":1407.7500076293945,"y":839.6666507720947,"z":"a04d05aa.96dde8","wires":[]},{"id":"25bfe2f3.42be26","type":"switchNode","name":"switch config count is > 1","xml":"<switch test=\"`$ctotmp.config-count > 1`\">\n","comments":"","outputs":1,"x":754.75,"y":808.6666641235352,"z":"a04d05aa.96dde8","wires":[["2bb9b7c5.0d3e3"]]},{"id":"2bb9b7c5.0d3e3","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":966.75,"y":808.6666641235352,"z":"a04d05aa.96dde8","wires":[["80e48cb9.af064"]]},{"id":"80e48cb9.af064","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1121.083251953125,"y":808.5555191040039,"z":"a04d05aa.96dde8","wires":[["6dd3a580.5e0194"]]},{"id":"6dd3a580.5e0194","type":"returnFailure","name":"return failure","xml":"<return 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 Allotted Resource is tied to more than one configuration object\" />\n","comments":"","x":1312.97216796875,"y":808.7778091430664,"z":"a04d05aa.96dde8","wires":[]},{"id":"d245ce9c.91bbd","type":"for","name":"for snidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]","xml":"<for silentFailure='true' index='snidx' start='`$tmp.sdidx + 1`' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n","comments":"","outputs":1,"x":1802.4800338745117,"y":1845.6665649414062,"z":"a04d05aa.96dde8","wires":[["b65abe87.5e08f"]]},{"id":"23c9b219.960fee","type":"comment","name":"Remove CAR from service data","info":"","comments":"","x":761.4642715454102,"y":1697.3336191177368,"z":"a04d05aa.96dde8","wires":[]},{"id":"bdea225f.6f7fc8","type":"switchNode","name":"switch $service-data.consumed-allotted-resource.length","xml":"<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n","comments":"","outputs":1,"x":838.2300415039062,"y":1729.7861623764038,"z":"a04d05aa.96dde8","wires":[["efda1bb.752dae8","dd386d7.e7be41"]]},{"id":"efda1bb.752dae8","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1194.6108779907227,"y":1736.4525785446167,"z":"a04d05aa.96dde8","wires":[["49c4422a.edb67c"]]},{"id":"ffcf9253.ba3f3","type":"set","name":"Remove AR","xml":"<set>\n\t<parameter name=\"service-data.consumed-allotted-resources.\" value=\"\"/>\n\n","comments":"","x":1582.785255432129,"y":1739.0083026885986,"z":"a04d05aa.96dde8","wires":[]},{"id":"dd386d7.e7be41","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1200.1981830596924,"y":1800.3731260299683,"z":"a04d05aa.96dde8","wires":[["8a9e3de7.2f9478"]]},{"id":"447a0de1.41832c","type":"set","name":"set new CAR length","xml":"<set>\n\t<parameter name=\"service-data.consumed-allotted-resources.consumed-allotted-resource_length\" value=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource_length - 1`\"/>\n\n\t\n","comments":"","x":1608.6055297851562,"y":1874.6590523719788,"z":"a04d05aa.96dde8","wires":[]},{"id":"42362158.38f3c","type":"set","name":"Remove CAR","xml":"<set>\n\t<parameter name=\"service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.new_length].\" value=\"\"/>\n\n","comments":"","x":1590.6741905212402,"y":1905.9602828025818,"z":"a04d05aa.96dde8","wires":[]},{"id":"8a9e3de7.2f9478","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1380.134651184082,"y":1801.6904907226562,"z":"a04d05aa.96dde8","wires":[["d245ce9c.91bbd","42362158.38f3c","447a0de1.41832c","927787fb.eeccc8"]]},{"id":"e6e786d6.769ce","type":"set","name":"set new consumed allotted resource length","xml":"<set>\n\t<parameter name=\"service-data.consumed-allotted-resources.consumed-allotted-resource_length\" value=\"0\"/>\n\n\t\n","comments":"","x":1679.1187591552734,"y":1770.3786115646362,"z":"a04d05aa.96dde8","wires":[]},{"id":"49c4422a.edb67c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1373.944190979004,"y":1737.1563749313354,"z":"a04d05aa.96dde8","wires":[["ffcf9253.ba3f3","e6e786d6.769ce"]]},{"id":"c682491d.909558","type":"comment","name":"If only one remove all networks","info":"","comments":"","x":1265.9812393188477,"y":1701.0453519821167,"z":"a04d05aa.96dde8","wires":[]},{"id":"927787fb.eeccc8","type":"set","name":"Set new length","xml":"<set>\n\t<parameter name=\"tmp.new_length\" value=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource_length - 1`\"/>\n\t\n\t\n","comments":"","x":1592.5525665283203,"y":1813.1403861045837,"z":"a04d05aa.96dde8","wires":[]},{"id":"414c2157.1c39e","type":"set","name":"move CAR to remove one","xml":"<set>\n\t<parameter name=\"service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.newidx].\" value=\"$service-data.consumed-allotted-resources.consumed-allotted-resource[$snidx].\" />\n\t\n","comments":"","x":2469.3214797973633,"y":1871.380958557129,"z":"a04d05aa.96dde8","wires":[]},{"id":"b65abe87.5e08f","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2229.8772354125977,"y":1848.1586666107178,"z":"a04d05aa.96dde8","wires":[["414c2157.1c39e","62a4a718.204748"]]},{"id":"62a4a718.204748","type":"set","name":"Set new index","xml":"<set>\n\t<parameter name=\"tmp.newidx\" value=\"`$snidx - 1`\"/>\n\t\n\t\n","comments":"","x":2433.469711303711,"y":1840.9736213684082,"z":"a04d05aa.96dde8","wires":[]},{"id":"e717d7fd.25afe8","type":"for","name":"for snidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]","xml":"<for silentFailure='true' index='snidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n","comments":"","outputs":1,"x":906.46435546875,"y":1601.3808364868164,"z":"a04d05aa.96dde8","wires":[["e99eb00f.4b885"]]},{"id":"e99eb00f.4b885","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1342.432991027832,"y":1599.5871868133545,"z":"a04d05aa.96dde8","wires":[["4b1a33f.3d9384c"]]},{"id":"4b1a33f.3d9384c","type":"switchNode","name":"switch AR found","xml":"<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource[$sdix].allotted-resource-id == $cto-api.contrail-route-allotted-resource-id`'>\n","comments":"","outputs":1,"x":1545.0357093811035,"y":1599.9522647857666,"z":"a04d05aa.96dde8","wires":[["e25770d3.30d32"]]},{"id":"22e3c0f3.c27ec8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1922.178611755371,"y":1598.5238161087036,"z":"a04d05aa.96dde8","wires":[["befee4f2.430c08","176989d0.1d21ee"]]},{"id":"befee4f2.430c08","type":"set","name":"Set sdidx","xml":"<set>\n\t<parameter name=\"tmp.sdidx\" value=\"`$snidx`\"/>\n\t\n\t\n","comments":"","x":2136.4643211364746,"y":1562.8095998764038,"z":"a04d05aa.96dde8","wires":[]},{"id":"176989d0.1d21ee","type":"break","name":"break","xml":"<break>\n","comments":"","x":2127.8928413391113,"y":1597.095314025879,"z":"a04d05aa.96dde8","wires":[]},{"id":"dfe3ed02.58c5c","type":"comment","name":"Find AR idx in consumed allotted resource list","info":"","comments":"","x":823.6071166992188,"y":1567.0952281951904,"z":"a04d05aa.96dde8","wires":[]},{"id":"e25770d3.30d32","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1733.607063293457,"y":1598.5238337516785,"z":"a04d05aa.96dde8","wires":[["22e3c0f3.c27ec8"]]}] \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_getpathsegment-create-composite-path.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_getpathsegment-create-composite-path.json
index 84357a95..9faec130 100755
--- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_getpathsegment-create-composite-path.json
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_getpathsegment-create-composite-path.json
@@ -1 +1 @@
-[{"id":"38b3fdb6.1bce32","type":"dgstart","name":"DGSTART","outputs":1,"x":101.66666412353516,"y":83.33332824707031,"z":"acdffee6.4646","wires":[["99e272a4.4e9a8"]]},{"id":"99e272a4.4e9a8","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":216.95236206054688,"y":123.5714340209961,"z":"acdffee6.4646","wires":[["1e63d80b.85a448"]]},{"id":"1e63d80b.85a448","type":"method","name":"method getpathsegment-create-composite-path","xml":"<method rpc='getpathsegment-create-composite-path' mode='sync'>\n","comments":"","outputs":1,"x":221.0952911376953,"y":164.3333225250244,"z":"acdffee6.4646","wires":[["df2ed6c2.cce068"]]},{"id":"1c6cd94a.dfdc47","type":"comment","name":"getpathsegment-create-composite-path","info":"","comments":"","x":496.0115203857422,"y":30.9196720123291,"z":"acdffee6.4646","wires":[]},{"id":"df2ed6c2.cce068","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":304.5000534057617,"y":303.46728324890137,"z":"acdffee6.4646","wires":[["fc83ec6a.1d401","d895c970.3dbc78"]]},{"id":"fc83ec6a.1d401","type":"get-resource","name":"get-resource PATH_SEGMENT","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from PATH_SEGMENT WHERE service_uuid = $getpathsegment-topology-operation-input.service-information.onap-model-information.model-uuid\n AND path_name = $db.forwarding-path[$path-index].path-name ORDER BY path_segment_seq'\n pfx='db.path-segment[]'>\n\n","comments":"","outputs":1,"x":527.6190452575684,"y":373.0952377319336,"z":"acdffee6.4646","wires":[["7ff0a241.207e8c","8b411eeb.03fd7","e62cb2cc.8b1b1"]]},{"id":"c64c7acf.8db458","type":"for","name":"for each path segment","xml":"<for index='path-segment-index' start='0' end='`$db.path-segment_length`' >\n","comments":"","outputs":1,"x":560.7738571166992,"y":557.4404888153076,"z":"acdffee6.4646","wires":[["c804b632.fcc3c8"]]},{"id":"c804b632.fcc3c8","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":758.9286117553711,"y":557.261869430542,"z":"acdffee6.4646","wires":[["4637dda4.0531c4","c55591ca.552ba"]]},{"id":"227d76b8.b8f89a","type":"set","name":"set serv-cust_length to 0","xml":"<set>\n<parameter name='serv-cust_length' value='0' />\n","comments":"","x":569.1667022705078,"y":509.58334255218506,"z":"acdffee6.4646","wires":[]},{"id":"4637dda4.0531c4","type":"set","name":"add source ids to serv-cust[]","xml":"<set>\n<parameter name='serv-cust[$serv-cust_length].id' value='`$db.path-segment[$path-segment-index].source-association-uuid`' />\n<parameter name='serv-cust_length' value='`$serv-cust_length + 1`' />\n","comments":"","x":984.1667098999023,"y":535.8333425521851,"z":"acdffee6.4646","wires":[]},{"id":"c55591ca.552ba","type":"switchNode","name":"is this the last path-segment?","xml":"<switch test='`$path-segment-index == ( $db.path-segment_length - 1) `'>\n","comments":"","outputs":1,"x":987.9167175292969,"y":580.8333435058594,"z":"acdffee6.4646","wires":[["f40592ef.6d056"]]},{"id":"f40592ef.6d056","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1184.1667194366455,"y":580.5833435058594,"z":"acdffee6.4646","wires":[["65efc56f.f80dcc"]]},{"id":"65efc56f.f80dcc","type":"set","name":"add target ids to serv-cust[]","xml":"<set>\n<parameter name='serv-cust[$serv-cust_length].id' value='`$db.path-segment[$path-segment-index].target-association-uuid`' />\n<parameter name='serv-cust_length' value='`$serv-cust_length + 1`' />\n","comments":"","x":1373.1667137145996,"y":579.8333435058594,"z":"acdffee6.4646","wires":[]},{"id":"d6d2ff5a.a38e6","type":"comment","name":"create list of service customization/invariant ids","info":"","comments":"","x":750.0000495910645,"y":460.41664600372314,"z":"acdffee6.4646","wires":[]},{"id":"eba93f08.848f6","type":"get-resource","name":"custom query - get runtime service-instances","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n\tresource=\"custom-query\"\n\tkey=\"format = 'resource'\"\n\tforce=\"true\"\n\tlocal-only=\"false\"\n\tpfx=\"aai.service-instances\" >\n\t<parameter name=\"start[0]\" value=\"`'nodes/service-instances?model-invariant-id=' + $serv-cust[$serv-index].inv-id`\" />\n\t<parameter name=\"start_length\" value=\"1\" />\n","comments":"","outputs":1,"x":1164.1666870117188,"y":815.5833110809326,"z":"acdffee6.4646","wires":[["4c07202b.a6ebd","465c9f69.063cf","dc42dfdf.fdb5"]]},{"id":"465c9f69.063cf","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1425.9129028320312,"y":806.4841794967651,"z":"acdffee6.4646","wires":[["e9829c01.c3518"]]},{"id":"4c07202b.a6ebd","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1434.8414993286133,"y":764.7699127197266,"z":"acdffee6.4646","wires":[["22fcdcd6.409e54"]]},{"id":"d895c970.3dbc78","type":"set","name":"set match-type","xml":"<set>\n<parameter name='match-type' value='network-name' />\n","comments":"","x":475.00000762939453,"y":243.33336734771729,"z":"acdffee6.4646","wires":[]},{"id":"3337a2c8.4f2c0e","type":"for","name":"for each service","xml":"<for index='serv-index' start='0' end='`$serv-cust_length`' >\n","comments":"","outputs":1,"x":542.9166564941406,"y":795.8333034515381,"z":"acdffee6.4646","wires":[["ea262156.5bc25"]]},{"id":"ba80debf.cd0aa","type":"for","name":"for each runtime service-instance","xml":"<for index='runtime-index' start='0' end='`$aai.service-instances.results_length`' >\n","comments":"","outputs":1,"x":1787.3809661865234,"y":897.261890411377,"z":"acdffee6.4646","wires":[["f4f23919.fbf798"]]},{"id":"37e396a3.2783fa","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":1601.487964630127,"y":1169.583387374878,"z":"acdffee6.4646","wires":[["e16fa584.ce8668","c9267106.d99d1","b7b866f.22cfd98","9f400084.68537","a4663c40.d0b5d"]]},{"id":"22fcdcd6.409e54","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"`'Unable to find runtime service instances for invariant UUID ' + $serv-cust[$serv-index].inv-id`\" />\n","comments":"","x":1639.1667098999023,"y":764.5833187103271,"z":"acdffee6.4646","wires":[]},{"id":"e9829c01.c3518","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"`'System error finding runtime service instances for customization UUID ' + $serv-cust[$serv-index].inv-id`\" />\n","comments":"","x":1637.9166870117188,"y":805.8333110809326,"z":"acdffee6.4646","wires":[]},{"id":"dc42dfdf.fdb5","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1427.5595741271973,"y":895.6547050476074,"z":"acdffee6.4646","wires":[["1a046dd0.664552"]]},{"id":"1a046dd0.664552","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":1568.8095741271973,"y":896.9047050476074,"z":"acdffee6.4646","wires":[["ba80debf.cd0aa","5a25eaf8.84c624","2fed2a61.3ba6d6"]]},{"id":"c9267106.d99d1","type":"execute","name":"generate port-mirror-configuration url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.service`\"/>\n <parameter name=\"outputPath\" value=\"tmp.service-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$serv-inst.service-instance-id`\"/>\n","comments":"","outputs":1,"x":1911.4878692626953,"y":1190.8334407806396,"z":"acdffee6.4646","wires":[[]]},{"id":"b7b866f.22cfd98","type":"execute","name":"execute RestApiCallNode - get service","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.service-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-service\" />\n\n","comments":"","outputs":1,"x":1918.8212051391602,"y":1473.9286651611328,"z":"acdffee6.4646","wires":[["44737e00.fd61a","e1d027ae.6e1bf8"]]},{"id":"44737e00.fd61a","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2181.367099761963,"y":1296.1292266845703,"z":"acdffee6.4646","wires":[["73b87896.db1488"]]},{"id":"e1d027ae.6e1bf8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2182.809181213379,"y":1772.3094692230225,"z":"acdffee6.4646","wires":[["e72fa4b8.6bb8f8"]]},{"id":"8d022a9b.038888","type":"comment","name":"Is this service in GENERIC-RESOURCE-API?","info":"","comments":"","x":1925.2497940063477,"y":1426.4286623001099,"z":"acdffee6.4646","wires":[]},{"id":"e16fa584.ce8668","type":"set","name":"clear mdsal-service and serv-inst.api","xml":"<set>\n<parameter name='mdsal-service.' value='' />\n<parameter name='serv-inst.api' value='' />\n","comments":"","x":1907.0712242126465,"y":1139.9405155181885,"z":"acdffee6.4646","wires":[]},{"id":"8786ac57.03e15","type":"set","name":"set serv-inst.service-instance-id","xml":"<set>\n<parameter name='serv-inst.service-instance-id' value='`$aai.service-instances.results[$runtime-index].service-instance.service-instance-id`' />\n","comments":"","x":2592.880962371826,"y":814.6428813934326,"z":"acdffee6.4646","wires":[]},{"id":"73b87896.db1488","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":2335.2379302978516,"y":1295.0833110809326,"z":"acdffee6.4646","wires":[["bae35c98.23485"]]},{"id":"bae35c98.23485","type":"switchNode","name":"switch vnf_length","xml":"<switch test='`$mdsal-service.service[0].service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":2520.237953186035,"y":1293.8333282470703,"z":"acdffee6.4646","wires":[["5de50820.6365a8","6a33778b.f0d2b8","8b08a0fc.3d573","156859cc.f57d36"]]},{"id":"5de50820.6365a8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2698.988010406494,"y":1145.8333530426025,"z":"acdffee6.4646","wires":[["5d43b7a0.cc8368"]]},{"id":"6a33778b.f0d2b8","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":2700.238010406494,"y":1184.5833530426025,"z":"acdffee6.4646","wires":[["5d43b7a0.cc8368"]]},{"id":"8b08a0fc.3d573","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2700.737949371338,"y":1520.8333282470703,"z":"acdffee6.4646","wires":[["7f9faf98.11444"]]},{"id":"7f9faf98.11444","type":"switchNode","name":"switch forwarding-path_length","xml":"<switch test='`$mdsal-service.service[0].service-data.forwarding-paths.forwarding-path_length`'>\n","comments":"","outputs":1,"x":2916.987953186035,"y":1522.0833282470703,"z":"acdffee6.4646","wires":[["b12a45c2.9c00f8","df779983.f9ee18","efeee58f.366df8"]]},{"id":"156859cc.f57d36","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":2703.988010406494,"y":1324.8333549499512,"z":"acdffee6.4646","wires":[["d321c3e5.b08ea"]]},{"id":"b12a45c2.9c00f8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":3128.9879837036133,"y":1458.3333358764648,"z":"acdffee6.4646","wires":[["6574fc05.7aa8d4"]]},{"id":"df779983.f9ee18","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":3130.2379837036133,"y":1497.0833358764648,"z":"acdffee6.4646","wires":[["6574fc05.7aa8d4"]]},{"id":"efeee58f.366df8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3127.3809661865234,"y":1591.7262210845947,"z":"acdffee6.4646","wires":[["cbc2b125.4a032"]]},{"id":"5d43b7a0.cc8368","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='data-error' value=\"`'Service instance ' + $si.service-instance-id + ' has no VNFs, skipping'`\" />\n","comments":"","x":2897.7379837036133,"y":1163.3333358764648,"z":"acdffee6.4646","wires":[]},{"id":"6574fc05.7aa8d4","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='data-error' value=\"`'Service instance ' + $serv-inst.service-instance-id + ' has multiple VNFs but no forwarding paths were found'`\" />\n","comments":"","x":3317.7379837036133,"y":1475.8333358764648,"z":"acdffee6.4646","wires":[]},{"id":"389f4f59.b5385","type":"call","name":"call GENERIC-RESOURCE-API:getpathsegment-populate-from-grapi","xml":"<call module='GENERIC-RESOURCE-API' rpc='getpathsegment-populate-from-grapi' mode='sync' >\n","comments":"","outputs":1,"x":3186.737953186035,"y":1274.0833282470703,"z":"acdffee6.4646","wires":[[]]},{"id":"ed8af0c2.a5e1e","type":"call","name":"call GENERIC-RESOURCE-API:getpathsegment-populate-from-vnfapi","xml":"<call module='GENERIC-RESOURCE-API' rpc='getpathsegment-populate-from-vnfapi' mode='sync' >\n","comments":"","outputs":1,"x":2647.80948638916,"y":1723.0832061767578,"z":"acdffee6.4646","wires":[[]]},{"id":"a8c16a6d.0d2f18","type":"success","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2661.2022552490234,"y":1910.5475997924805,"z":"acdffee6.4646","wires":[["ac5e9274.a71eb"]]},{"id":"23ce8b1d.277d04","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2658.7022666931152,"y":1776.6310663223267,"z":"acdffee6.4646","wires":[["1300cf7.befc831"]]},{"id":"1300cf7.befc831","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='data-error' value=\"`'Failure finding service instance ' + $si.service-instance-id + ' in either GENERIC-REOURCE-API or VNF-API'`\" />\n","comments":"","x":2872.452236175537,"y":1775.1310510635376,"z":"acdffee6.4646","wires":[]},{"id":"ac5e9274.a71eb","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2812.4525032043457,"y":1909.2975997924805,"z":"acdffee6.4646","wires":[["bab97280.4fcff"]]},{"id":"3f21a433.f89dbc","type":"set","name":"copy serv-inst to serv-insts array","xml":"<set>\n<parameter name='serv-cust[$serv-index].serv-insts[$tmp.serv-insts_length].' value='`$serv-inst.`' />\n","comments":"","x":3074.237953186035,"y":1327.8333282470703,"z":"acdffee6.4646","wires":[]},{"id":"f723823c.14d35","type":"set","name":"increment serv-insts_length","xml":"<set>\n<parameter name='tmp.serv-insts_length' value='`$tmp.serv-insts_length + 1`' />\n","comments":"","x":3055.487922668457,"y":1382.833309173584,"z":"acdffee6.4646","wires":[]},{"id":"d321c3e5.b08ea","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":2853.9879837036133,"y":1324.5833358764648,"z":"acdffee6.4646","wires":[["389f4f59.b5385","3f21a433.f89dbc","f723823c.14d35"]]},{"id":"5a25eaf8.84c624","type":"set","name":"set tmp.serv-insts_length to 0","xml":"<set>\n<parameter name='tmp.serv-insts_length' value='0' />\n","comments":"","x":1781.1309967041016,"y":848.1547393798828,"z":"acdffee6.4646","wires":[]},{"id":"e72fa4b8.6bb8f8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2309.297294616699,"y":1780.047555923462,"z":"acdffee6.4646","wires":[["ed8af0c2.a5e1e","78b047cf.ed86c8"]]},{"id":"78b047cf.ed86c8","type":"switchNode","name":"switch serv-inst.api","xml":"<switch test='`$serv-inst.api`'>\n","comments":"","outputs":1,"x":2492.393165588379,"y":1845.1666173934937,"z":"acdffee6.4646","wires":[["23ce8b1d.277d04","a8c16a6d.0d2f18"]]},{"id":"2de86e6.3962e92","type":"set","name":"copy serv-inst to serv-insts array","xml":"<set>\n<parameter name='serv-cust[$serv-index].serv-insts[$tmp.serv-insts_length].' value='`$serv-inst.`' />\n","comments":"","x":3539.0593872070312,"y":2006.5000267028809,"z":"acdffee6.4646","wires":[]},{"id":"f4f23919.fbf798","type":"switchNode","name":"switch orchestration-status","xml":"<switch test='`$aai.service-instances.results[$runtime-index].service-instance.orchestration-status`'>\n","comments":"","outputs":1,"x":2059.7024688720703,"y":897.0832557678223,"z":"acdffee6.4646","wires":[["83f502d6.2f5a4"]]},{"id":"83f502d6.2f5a4","type":"outcome","name":"Active","xml":"<outcome value='Active'>\n","comments":"","outputs":1,"x":2254.1665954589844,"y":895.8332214355469,"z":"acdffee6.4646","wires":[["442aff0f.a1283"]]},{"id":"1398c294.3f952d","type":"for","name":"for each service","xml":"<for index='serv-index' start='0' end='`$serv-cust_length`' >\n","comments":"","outputs":1,"x":539.583366394043,"y":668.7500200271606,"z":"acdffee6.4646","wires":[["ecfee624.daec78"]]},{"id":"f6adfe96.32d5f","type":"comment","name":"convert customization uuid to invariant uuid","info":"","comments":"","x":668.3334045410156,"y":626.250018119812,"z":"acdffee6.4646","wires":[]},{"id":"15831d68.36e8b3","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1121.2024307250977,"y":625.3093452453613,"z":"acdffee6.4646","wires":[["be78a9fd.371368"]]},{"id":"745ebab0.1a84e4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1127.2738418579102,"y":666.0950517654419,"z":"acdffee6.4646","wires":[["dfab331.23ebcd"]]},{"id":"ecfee624.daec78","type":"get-resource","name":"get-resource SERVICE_PROXY, SERVICE_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n key='select sm.invariant_uuid\n from SERVICE_PROXY sp, SERVICE_MODEL sm\n where sp.parent_service_uuid = sm.service_uuid\n and sp.customization_uuid = $serv-cust[$serv-index].id'\n pfx='db'>\n","comments":"","outputs":1,"x":844.5238189697266,"y":668.5714359283447,"z":"acdffee6.4646","wires":[["15831d68.36e8b3","745ebab0.1a84e4","577c9bbc.66ccc4"]]},{"id":"577c9bbc.66ccc4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1122.083351135254,"y":707.5000200271606,"z":"acdffee6.4646","wires":[["1848871c.fbafd9"]]},{"id":"1848871c.fbafd9","type":"set","name":"store invariant id","xml":"<set>\n<parameter name='serv-cust[$serv-index].inv-id' value='`$db.invariant-uuid`' />\n","comments":"","x":1287.0833587646484,"y":707.5000200271606,"z":"acdffee6.4646","wires":[]},{"id":"be78a9fd.371368","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"`'Failure reading SERVICE_PROXY and SERVICE_MODEL for customization uuid ' + $serv-cust[$serv-index].id`\" />\n","comments":"","x":1315.8333549499512,"y":625.0000190734863,"z":"acdffee6.4646","wires":[]},{"id":"dfab331.23ebcd","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"`'Cannot find entries in SERVICE_PROXY and SERVICE_MODEL for customization uuid ' + $serv-cust[$serv-index].id`\" />\n","comments":"","x":1315.8333358764648,"y":665.0000104904175,"z":"acdffee6.4646","wires":[]},{"id":"ea262156.5bc25","type":"switchNode","name":"switch invariant uuid","xml":"<switch test='`$serv-cust[$serv-index].inv-id`'>\n","comments":"","outputs":1,"x":741.6666793823242,"y":794.5833110809326,"z":"acdffee6.4646","wires":[["6e5ea8a8.3f7578","38fd826b.e7840e"]]},{"id":"6e5ea8a8.3f7578","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":907.9166831970215,"y":765.8333110809326,"z":"acdffee6.4646","wires":[["458e60e8.0fa83"]]},{"id":"38fd826b.e7840e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":908.7381553649902,"y":816.1192016601562,"z":"acdffee6.4646","wires":[["eba93f08.848f6"]]},{"id":"458e60e8.0fa83","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1044.1666831970215,"y":765.0833101272583,"z":"acdffee6.4646","wires":[[]]},{"id":"3b868648.17a23a","type":"call","name":"call GENERIC-RESOURCE-API:getpathsegment-composite-match-pair","xml":"<call module='GENERIC-RESOURCE-API' rpc='getpathsegment-composite-match-pair' mode='sync' >\n","comments":"","outputs":1,"x":687.9287109375,"y":2361.2736377716064,"z":"acdffee6.4646","wires":[[]]},{"id":"cbc2b125.4a032","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":3256.1309661865234,"y":1591.7262210845947,"z":"acdffee6.4646","wires":[["e63540a5.81689","c13e34b7.f42fb8","a14b9b6d.2bbee8","7ace4a44.fb42f4"]]},{"id":"e63540a5.81689","type":"set","name":"copy forwarding-paths to serv-insts array","xml":"<set>\n<parameter name='serv-cust[$serv-index].serv-insts[$tmp.serv-insts_length].forwarding-paths.'\n value='`$mdsal-service.service[0].service-data.forwarding-paths.`' />\n","comments":"","x":3503.988082885742,"y":1615.2975959777832,"z":"acdffee6.4646","wires":[]},{"id":"c13e34b7.f42fb8","type":"set","name":"increment serv-insts_length","xml":"<set>\n<parameter name='tmp.serv-insts_length' value='`$tmp.serv-insts_length + 1`' />\n","comments":"","x":3462.5592651367188,"y":1662.0834131240845,"z":"acdffee6.4646","wires":[]},{"id":"a14b9b6d.2bbee8","type":"call","name":"call GENERIC-RESOURCE-API:getpathsegment-populate-from-grapi","xml":"<call module='GENERIC-RESOURCE-API' rpc='getpathsegment-populate-from-grapi' mode='sync' >\n","comments":"","outputs":1,"x":3588.2736282348633,"y":1527.0833358764648,"z":"acdffee6.4646","wires":[[]]},{"id":"7ace4a44.fb42f4","type":"set","name":"copy serv-inst to serv-insts array","xml":"<set>\n<parameter name='serv-cust[$serv-index].serv-insts[$tmp.serv-insts_length].' value='`$serv-inst.`' />\n","comments":"","x":3475.4166946411133,"y":1568.5119247436523,"z":"acdffee6.4646","wires":[]},{"id":"9f400084.68537","type":"set","name":"clear serv-inst","xml":"<set>\n<parameter name='serv-inst.' value='' />\n","comments":"","x":1837.9879150390625,"y":1518.511981010437,"z":"acdffee6.4646","wires":[]},{"id":"2fed2a61.3ba6d6","type":"set","name":"set final serv-insts_length","xml":"<set>\n<parameter name='serv-cust[$serv-index].serv-insts_length' value='`$tmp.serv-insts_length`' />\n","comments":"","x":1765.4167137145996,"y":942.7975521087646,"z":"acdffee6.4646","wires":[]},{"id":"e2bb1296.6a77f","type":"comment","name":"Create forwarding-path structure","info":"","comments":"","x":1804.2026138305664,"y":2759.249895095825,"z":"acdffee6.4646","wires":[]},{"id":"9c1deb3.fce3a18","type":"switchNode","name":"switch service-paths.service-path_length","xml":"<switch test='`$service-paths.service-path_length`'>\n","comments":"","outputs":1,"x":588.7024993896484,"y":2585.0833568573,"z":"acdffee6.4646","wires":[["c17848c4.7aa328","891625b0.f7b498","2b7b5767.caf788"]]},{"id":"c17848c4.7aa328","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":868.7024803161621,"y":2441.7497968673706,"z":"acdffee6.4646","wires":[["9234ee5.d733b1"]]},{"id":"891625b0.f7b498","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":869.9524803161621,"y":2480.4997968673706,"z":"acdffee6.4646","wires":[["9234ee5.d733b1"]]},{"id":"2b7b5767.caf788","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":865.9524955749512,"y":2712.0001287460327,"z":"acdffee6.4646","wires":[["db0b5e4d.138fb"]]},{"id":"9234ee5.d733b1","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1002.0358390808105,"y":2455.0831298828125,"z":"acdffee6.4646","wires":[[]]},{"id":"9957ee7a.eb839","type":"set","name":"set top-level data","xml":"<set>\n<parameter name='forwarding-path.forwarding-path-name' value='`$db.path-segment[0].path-name`' />\n<parameter name='forwarding-path.forwarding-path-type' value='Service' />\n<parameter name='forwarding-path.onap-model-information.model-name' value='`$db.path-segment[0].path-name`' />\n","comments":"","x":1715.0359230041504,"y":2846.749963760376,"z":"acdffee6.4646","wires":[]},{"id":"2464da2e.bc2576","type":"execute","name":"generate forwarding-path-id","xml":"<execute plugin=\"org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils\" method=\"generateUUID\" >\n<parameter name=\"ctx-destination\" value=\"forwarding-path.forwarding-path-id\" />\n","comments":"","outputs":1,"x":1747.1192169189453,"y":2800.916626930237,"z":"acdffee6.4646","wires":[[]]},{"id":"5d113599.9797dc","type":"set","name":"copy service-path","xml":"<set>\n<parameter name='forwarding-path.service-paths.' value='`$service-paths.`' />\n","comments":"","x":1713.3692474365234,"y":2891.7502098083496,"z":"acdffee6.4646","wires":[]},{"id":"654073a0.8dc7dc","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1525.0359649658203,"y":3155.0832328796387,"z":"acdffee6.4646","wires":[["2464da2e.bc2576","9957ee7a.eb839","5d113599.9797dc","7ecab0fa.15895","76d060fc.5c71a","94003a26.69b068","532dd116.0d3c4"]]},{"id":"a4663c40.d0b5d","type":"switchNode","name":"switch runtime-index","xml":"<switch test='`$runtime-index`'>\n","comments":"","outputs":1,"x":1859.7022666931152,"y":1011.8452968597412,"z":"acdffee6.4646","wires":[["4db5c1dc.9f95c"]]},{"id":"4db5c1dc.9f95c","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":2029.7022972106934,"y":1011.8453140258789,"z":"acdffee6.4646","wires":[["dcb4004e.9356a"]]},{"id":"dcb4004e.9356a","type":"set","name":"save service.service-role","xml":"<set>\n<parameter name='service.service-role' value='`$aai.service-instances.results[0].service-instance.service-role`' />\n","comments":"","x":2208.2736206054688,"y":1011.8452968597412,"z":"acdffee6.4646","wires":[]},{"id":"442aff0f.a1283","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2380.416763305664,"y":895.4166278839111,"z":"acdffee6.4646","wires":[["37e396a3.2783fa","efbbd2cc.0e547","8786ac57.03e15"]]},{"id":"efbbd2cc.0e547","type":"switchNode","name":"switch output-global-customer-id","xml":"<switch test='`$output-global-customer-id`'>\n","comments":"","outputs":1,"x":2595.4166717529297,"y":860.4166126251221,"z":"acdffee6.4646","wires":[["9b84fbe4.e396d8"]]},{"id":"9b84fbe4.e396d8","type":"outcome","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2802.0833892822266,"y":858.7499856948853,"z":"acdffee6.4646","wires":[["6b285851.2f4b58"]]},{"id":"30bb031c.093bcc","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":3375.416572570801,"y":855.4166278839111,"z":"acdffee6.4646","wires":[["b34e010d.49543","966e7225.52122"]]},{"id":"6b285851.2f4b58","type":"save","name":"custom query: get service instance","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"custom-query\"\n key=\"format = 'resource_and_url'\"\n force=\"true\"\n local-only=\"false\"\n pfx=\"tmp.AnAI-data.si\">\n\t<parameter name=\"start[0]\" value=\"`'nodes/service-instance/' + $serv-inst.service-instance-id `\" />\n\t<parameter name=\"start_length\" value=\"1\" />\n","comments":"","outputs":1,"x":3020.416534423828,"y":857.083399772644,"z":"acdffee6.4646","wires":[["5e0c0bf4.dca7b4"]]},{"id":"b34e010d.49543","type":"execute","name":"execute split","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n\t<parameter name=\"original_string\" value=\"`$tmp.AnAI-data.si.results[0].url`\" />\n\t<parameter name=\"regex\" value=\"/\"/>\n\t<parameter name=\"limit\" value=\"11\" />\n\t<parameter name=\"ctx_memory_result_key\" value=\"split\" />\n","comments":"","outputs":1,"x":3528.749973297119,"y":835.4167575836182,"z":"acdffee6.4646","wires":[[]]},{"id":"5e0c0bf4.dca7b4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3242.0832595825195,"y":856.7500123977661,"z":"acdffee6.4646","wires":[["30bb031c.093bcc"]]},{"id":"966e7225.52122","type":"set","name":"set output-global-customer-id, etc","xml":"<set>\n<parameter name='output-global-customer-id' value='`$split[6]`' />\n<parameter name='output-service-type' value='`$split[9]`' />\n<parameter name='output-service-role' value='`$tmp.AnAI-data.si.results[0].service-instance.service-role`' />\n","comments":"","x":3595.416763305664,"y":880.4166374206543,"z":"acdffee6.4646","wires":[]},{"id":"7d31078f.efb3d8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2128.60733795166,"y":3068.8931226730347,"z":"acdffee6.4646","wires":[["87ecc4ba.953798","e1f74301.3a592","ea9cb947.2f8788","7177f03.da2611","960587e2.909438"]]},{"id":"87ecc4ba.953798","type":"execute","name":"generate service-instance-id","xml":"<execute plugin=\"org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils\" method=\"generateUUID\" >\n<parameter name=\"ctx-destination\" value=\"tmp.service-instance-id\" />\n","comments":"","outputs":1,"x":2335.274076461792,"y":2968.1788692474365,"z":"acdffee6.4646","wires":[[]]},{"id":"14ba220e.0a427e","type":"comment","name":"Make a new service instance in GR-API","info":"","comments":"","x":2441.5239963531494,"y":2931.0953826904297,"z":"acdffee6.4646","wires":[]},{"id":"7177f03.da2611","type":"save","name":"save service-instance to A&AI","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"service-instance\" \n\tkey=\"customer.global-customer-id = $output-global-customer-id\n\t AND service-subscription.service-type = $output-service-type\n\t AND service-instance.service-instance-id = $tmp.service-instance-id\" >\n<parameter name=\"service-instance-id\" value=\"`$tmp.service-instance-id`\" />\n<parameter name=\"global-customer-id\" value=\"`$output-global-customer-id`\" />\n<parameter name=\"service-type\" value=\"`$output-service-type`\" />\n<parameter name=\"service-role\" value=\"`$output-service-role`\" />\n","comments":"","outputs":1,"x":2339.202896118164,"y":3150.0238361358643,"z":"acdffee6.4646","wires":[["2ad23b25.4eac74","8b691431.cc9278"]]},{"id":"83430cdc.a419d","type":"comment","name":"Make a new service instance in A&AI","info":"","comments":"","x":2429.917154312134,"y":3092.16690826416,"z":"acdffee6.4646","wires":[]},{"id":"ea9cb947.2f8788","type":"execute","name":"execute RestApiCallNode - PUT service-instance","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.csm.serviceinstance.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.service-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-sr\" />\n\n","comments":"","outputs":1,"x":2400.2742023468018,"y":3054.845375061035,"z":"acdffee6.4646","wires":[["97c9808b.9352c"]]},{"id":"e1f74301.3a592","type":"execute","name":"generate service-instance url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.service`\"/>\n <parameter name=\"outputPath\" value=\"tmp.service-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.service-instance-id`\"/>\n","comments":"","outputs":1,"x":2336.5242023468018,"y":3012.345374107361,"z":"acdffee6.4646","wires":[[]]},{"id":"7ecab0fa.15895","type":"switchNode","name":"switch output-service-instance-id","xml":"<switch test='`$output-service-instance-id`'>\n","comments":"","outputs":1,"x":1767.4168243408203,"y":3076.5121965408325,"z":"acdffee6.4646","wires":[["6bc7823b.9fccbc","f3d20003.45381"]]},{"id":"7ff0a241.207e8c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":738.7499389648438,"y":328.75,"z":"acdffee6.4646","wires":[["ae348eba.10a95"]]},{"id":"8b411eeb.03fd7","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":747.3213691711426,"y":372.0357131958008,"z":"acdffee6.4646","wires":[["6abf5986.be9818"]]},{"id":"ae348eba.10a95","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":892.0120735168457,"y":327.0715398788452,"z":"acdffee6.4646","wires":[["4a5f6f0b.dcc33"]]},{"id":"6abf5986.be9818","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":892.0120964050293,"y":372.07152938842773,"z":"acdffee6.4646","wires":[["8def3ed6.72da5"]]},{"id":"4a5f6f0b.dcc33","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"`'System error reading PATH_SEGMENT table for uuid '\n + $getpathsegment-topology-operation-input.service-information.onap-model-information.model-uuid\n + ' and path '\n + $db.forwarding-path[$path-index].path-name`\" />\n","comments":"","x":1092.0122184753418,"y":325.4048738479614,"z":"acdffee6.4646","wires":[]},{"id":"8def3ed6.72da5","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"`'No entries in PATH_SEGMENT table for uuid '\n + $getpathsegment-topology-operation-input.service-information.onap-model-information.model-uuid\n + ' and path '\n + $db.forwarding-path[$path-index].path-name`\" />\n","comments":"","x":1092.012035369873,"y":372.07152938842773,"z":"acdffee6.4646","wires":[]},{"id":"e62cb2cc.8b1b1","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":743.6787948608398,"y":415.4048881530762,"z":"acdffee6.4646","wires":[["766a7c4c.6db704"]]},{"id":"766a7c4c.6db704","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":113.6309585571289,"y":1673.2737884521484,"z":"acdffee6.4646","wires":[["227d76b8.b8f89a","c64c7acf.8db458","1398c294.3f952d","3337a2c8.4f2c0e","3b868648.17a23a","9c1deb3.fce3a18","31223e46.c39562"]]},{"id":"6bc7823b.9fccbc","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1988.607292175293,"y":3055.5597352981567,"z":"acdffee6.4646","wires":[["7d31078f.efb3d8"]]},{"id":"f3d20003.45381","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":1988.4287033081055,"y":3097.1668796539307,"z":"acdffee6.4646","wires":[["7d31078f.efb3d8"]]},{"id":"960587e2.909438","type":"set","name":"set output-service-instance-id","xml":"<set>\n<parameter name='output-service-instance-id' value='`$tmp.service-instance-id`' />\n","comments":"","x":2334.797737121582,"y":3214.6070919036865,"z":"acdffee6.4646","wires":[]},{"id":"94003a26.69b068","type":"execute","name":"execute RestApiCallNode - PUT forwarding-path","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.forwardingpath.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.fp-url + $forwarding-path.forwarding-path-id`' />\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-fp\" />\n\n","comments":"","outputs":1,"x":1810.0359344482422,"y":3339.3693075180054,"z":"acdffee6.4646","wires":[["e3e2ddf6.f153f","b2430abe.dc8828"]]},{"id":"e3e2ddf6.f153f","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2080.5224685668945,"y":3363.6175785064697,"z":"acdffee6.4646","wires":[["aac11982.8688f8"]]},{"id":"b2430abe.dc8828","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2072.951103210449,"y":3322.1175985336304,"z":"acdffee6.4646","wires":[["aac11982.8688f8"]]},{"id":"aac11982.8688f8","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"Failure writing forwarding-path to MD-SAL\" />\n","comments":"","x":2292.5359420776367,"y":3336.8693075180054,"z":"acdffee6.4646","wires":[]},{"id":"76d060fc.5c71a","type":"execute","name":"generate forwarding-path url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.forwarding-path`\"/>\n <parameter name=\"outputPath\" value=\"tmp.fp-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$output-service-instance-id`\"/>\n","comments":"","outputs":1,"x":1747.952766418457,"y":3282.285427093506,"z":"acdffee6.4646","wires":[[]]},{"id":"ec6851e3.24d41","type":"save","name":"save forwarding-path to A&AI","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"forwarding-path\" \n\tkey=\"forwarding-path.forwarding-path-id = $forwarding-path.service-paths.service-path[$sp-index].service-path-instance-id\" >\n<parameter name=\"forwarding-path-id\" value=\"`$forwarding-path.service-paths.service-path[$sp-index].service-path-instance-id`\" />\n<parameter name=\"forwarding-path-name\" value=\"`$forwarding-path.service-paths.service-path[$sp-index].service-path-instance-name`\" />\n<parameter name=\"selflink\" value=\"`'/restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $output-service-instance-id\n + '/forwarding-paths/forwarding-path/'\n + $forwarding-path.forwarding-path-id\n + '/services-paths/service-path/'\n + $forwarding-path.service-paths.service-path[$sp-index].service-path-instance-id`\" />\n","comments":"","outputs":1,"x":2564.072067260742,"y":3421.226315498352,"z":"acdffee6.4646","wires":[["782723e.d6f5edc","173a4200.c682ae"]]},{"id":"f9f23fe5.c832e","type":"save","name":"save forwarding-path relationship to service-instance","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"forwarding-path:relationship-list\"\n key=\"forwarding-path.forwarding-path-id = $forwarding-path.service-paths.service-path[$sp-index].service-path-instance-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n <parameter name=\"relationship-list.relationship[0].related-to\" value=\"service-instance\" />\n <parameter name=\"relationship-list.relationship[0].related-link\"\n value=\"`'/aai/v$/business/customers/customer/'\n + $output-global-customer-id\n + '/service-subscriptions/service-subscription/'\n + $output-service-type\n + '/service-instances/service-instance/'\n + $output-service-instance-id`\" />\n","comments":"","outputs":1,"x":2635.73876953125,"y":3501.46435546875,"z":"acdffee6.4646","wires":[["c1b3e443.b892d8","a4072ca.00fd3d"]]},{"id":"2f92c949.4d6476","type":"for","name":"for each vnf","xml":"<for index='vnf-index' start='0' end='`$forwarding-path.service-paths.service-path[$sp-index].service[$service-index].vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":2725.500457763672,"y":3630.274257659912,"z":"acdffee6.4646","wires":[["d2f257bf.d8fd58"]]},{"id":"d2f257bf.d8fd58","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2870.2624740600586,"y":3629.8454303741455,"z":"acdffee6.4646","wires":[["81a978c4.55a318","1825f2cc.d9255d"]]},{"id":"81a978c4.55a318","type":"save","name":"save forwarder to A&AI","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"forwarder\" \n\tkey=\"forwarding-path.forwarding-path-id = $forwarding-path.service-paths.service-path[$sp-index].service-path-instance-id\n\t AND forwarder.sequence = $forwarding-path.service-paths.service-path[$sp-index].service[$service-index].vnfs.vnf[$vnf-index].vnf-path-sequence-id\" >\n<parameter name=\"sequence\" value=\"`$forwarding-path.service-paths.service-path[$sp-index].service[$service-index].vnfs.vnf[$vnf-index].vnf-path-sequence-id`\" />\n","comments":"","outputs":1,"x":3051.262517929077,"y":3585.750457763672,"z":"acdffee6.4646","wires":[["a8b88931.1b04b8","18196271.6ec47e"]]},{"id":"1825f2cc.d9255d","type":"save","name":"save forwarder relationship to generic-vnf","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"forwarder:relationship-list\"\n key=\"forwarding-path.forwarding-path-id = $forwarding-path.service-paths.service-path[$sp-index].service-path-instance-id\n AND forwarder.sequence = $forwarding-path.service-paths.service-path[$sp-index].service[$service-index].vnfs.vnf[$vnf-index].vnf-path-sequence-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n <parameter name=\"relationship-list.relationship[0].related-to\" value=\"generic-vnf\" />\n <parameter name=\"relationship-list.relationship[0].related-link\"\n value=\"`'/aai/v$/network/generic-vnfs/generic-vnf/'\n + $forwarding-path.service-paths.service-path[$sp-index].service[$service-index].vnfs.vnf[$vnf-index].vnf-instance-id`\" />\n","comments":"","outputs":1,"x":3105.262519836426,"y":3675.036106109619,"z":"acdffee6.4646","wires":[["9e2d3b55.8e6d18","be4a1ccd.60699"]]},{"id":"31223e46.c39562","type":"execute","name":"printContext","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/gpsx.log' />\n","comments":"","outputs":1,"x":507.0833282470703,"y":2412.0832509994507,"z":"acdffee6.4646","wires":[[]]},{"id":"173a4200.c682ae","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2772.750198364258,"y":3441.0832204818726,"z":"acdffee6.4646","wires":[["7abb5ae4.45ef84"]]},{"id":"782723e.d6f5edc","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2765.1788330078125,"y":3399.583240509033,"z":"acdffee6.4646","wires":[["7abb5ae4.45ef84"]]},{"id":"7abb5ae4.45ef84","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"Failure writing forwarding-path to AAI\" />\n","comments":"","x":2969.7636108398438,"y":3414.3350400924683,"z":"acdffee6.4646","wires":[]},{"id":"a4072ca.00fd3d","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2917.7501792907715,"y":3524.4164247512817,"z":"acdffee6.4646","wires":[["38f6157.8f1caea"]]},{"id":"c1b3e443.b892d8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2908.5120849609375,"y":3477.916492462158,"z":"acdffee6.4646","wires":[["38f6157.8f1caea"]]},{"id":"38f6157.8f1caea","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"Failure writing forwarding-path relationship to AAI\" />\n","comments":"","x":3113.096908569336,"y":3492.6682138442993,"z":"acdffee6.4646","wires":[]},{"id":"18196271.6ec47e","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3242.7502117156982,"y":3607.749852180481,"z":"acdffee6.4646","wires":[["ede6f0bd.9d33c"]]},{"id":"a8b88931.1b04b8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3235.178846359253,"y":3566.2498722076416,"z":"acdffee6.4646","wires":[["ede6f0bd.9d33c"]]},{"id":"ede6f0bd.9d33c","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"Failure writing forwarder to AAI\" />\n","comments":"","x":3438.0970458984375,"y":3581.001434326172,"z":"acdffee6.4646","wires":[]},{"id":"be4a1ccd.60699","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3347.7501678466797,"y":3699.416358947754,"z":"acdffee6.4646","wires":[["6576c8ed.7d6ce8"]]},{"id":"9e2d3b55.8e6d18","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3340.1788024902344,"y":3657.9163789749146,"z":"acdffee6.4646","wires":[["6576c8ed.7d6ce8"]]},{"id":"6576c8ed.7d6ce8","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"Failure writing forwarder relationship to AAI\" />\n","comments":"","x":3541.4303436279297,"y":3672.667942047119,"z":"acdffee6.4646","wires":[]},{"id":"ee78a452.895eb8","type":"for","name":"for each service","xml":"<for index='service-index' start='0' end='`$service-paths.service-path[$sp-index].service_length`' >\n","comments":"","outputs":1,"x":2534.416831970215,"y":3631.083258628845,"z":"acdffee6.4646","wires":[["2f92c949.4d6476"]]},{"id":"8b691431.cc9278","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2550.0833892822266,"y":3170.4164781570435,"z":"acdffee6.4646","wires":[["28ee0b7.a193cf4"]]},{"id":"2ad23b25.4eac74","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2542.5120239257812,"y":3128.916498184204,"z":"acdffee6.4646","wires":[["28ee0b7.a193cf4"]]},{"id":"28ee0b7.a193cf4","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"Failure creating service instance in AAI\" />\n","comments":"","x":2745.430223464966,"y":3143.6680603027344,"z":"acdffee6.4646","wires":[]},{"id":"97c9808b.9352c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2660.0833892822266,"y":3053.7497301101685,"z":"acdffee6.4646","wires":[["1818ef16.6dc701"]]},{"id":"1818ef16.6dc701","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"Failure creating service instance in MD-SAL\" />\n","comments":"","x":2850.0833892822266,"y":3052.0829820632935,"z":"acdffee6.4646","wires":[]},{"id":"d843bbaa.11f848","type":"set","name":"increment serv-insts_length","xml":"<set>\n<parameter name='tmp.serv-insts_length' value='`$tmp.serv-insts_length + 1`' />\n","comments":"","x":3523.7498168945312,"y":2057.916774749756,"z":"acdffee6.4646","wires":[]},{"id":"532dd116.0d3c4","type":"for","name":"for each service-path","xml":"<for index='sp-index' start='0' end='`$service-paths.service-path_length`' >\n","comments":"","outputs":1,"x":1718.4169311523438,"y":3522.0831785202026,"z":"acdffee6.4646","wires":[["6026a1f0.02df4"]]},{"id":"bab97280.4fcff","type":"switchNode","name":"switch vnf_length","xml":"<switch test='`$serv-inst.vnf-list_length`'>\n","comments":"","outputs":1,"x":2978.809280395508,"y":2006.4284648895264,"z":"acdffee6.4646","wires":[["83930c1.6232af","415745e9.86f9ec","a96c0af7.4076f8","7fb684c8.1e8ddc"]]},{"id":"83930c1.6232af","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":3181.6666107177734,"y":1924.9999256134033,"z":"acdffee6.4646","wires":[["495a7820.28bb28"]]},{"id":"415745e9.86f9ec","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":3182.9166107177734,"y":1963.7499256134033,"z":"acdffee6.4646","wires":[["495a7820.28bb28"]]},{"id":"495a7820.28bb28","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='data-error' value=\"`'Service instance ' + $si.service-instance-id + ' has no VNFs, skipping'`\" />\n","comments":"","x":3380.4165573120117,"y":1942.4998750686646,"z":"acdffee6.4646","wires":[]},{"id":"a96c0af7.4076f8","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":3181.666549682617,"y":2032.4999074935913,"z":"acdffee6.4646","wires":[["bff428c8.cc6008"]]},{"id":"bff428c8.cc6008","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":3331.6665229797363,"y":2032.249888420105,"z":"acdffee6.4646","wires":[["2de86e6.3962e92","d843bbaa.11f848"]]},{"id":"7fb684c8.1e8ddc","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3184.166717529297,"y":2166.6664543151855,"z":"acdffee6.4646","wires":[["93bc2b5.8b736d8"]]},{"id":"93bc2b5.8b736d8","type":"get-resource","name":"get-resource SERVICE_INSTANCE_TO_COMPOSITE_INSTANCE_MAPPING","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n key='SELECT forwarding_path_service_instance_id from SERVICE_INSTANCE_TO_COMPOSITE_INSTANCE_MAPPING WHERE simple_service_instance_id = $serv-inst.service-instance-id'\n pfx='db.mapped-service-instance-id'>\n\n","comments":"","outputs":1,"x":3556.5481567382812,"y":2165.952667236328,"z":"acdffee6.4646","wires":[["30b771e0.9efa2e","ac42250b.451688","9c7d869c.656378"]]},{"id":"30b771e0.9efa2e","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3923.1668853759766,"y":2097.642951965332,"z":"acdffee6.4646","wires":[["3cc43602.d355aa"]]},{"id":"ac42250b.451688","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3931.7383155822754,"y":2141.928665161133,"z":"acdffee6.4646","wires":[["c6af0644.d6e838"]]},{"id":"3cc43602.d355aa","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='data-error' value=\"System error reading SERVICE_INSTANCE_TO_COMPOSITE_INSTANCE_MAPPING table\" />\n","comments":"","x":4140.000244140625,"y":2095.8333253860474,"z":"acdffee6.4646","wires":[]},{"id":"c6af0644.d6e838","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='data-error' value=\"`'No entry in SERVICE_INSTANCE_TO_COMPOSITE_INSTANCE_MAPPING table for service instance ' + $serv-inst.service-instance-id`\" />\n","comments":"","x":4140.000076293945,"y":2142.166621208191,"z":"acdffee6.4646","wires":[]},{"id":"9c7d869c.656378","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3928.333480834961,"y":2237.500123023987,"z":"acdffee6.4646","wires":[["47635cab.dcb404"]]},{"id":"47635cab.dcb404","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":4064.9997482299805,"y":2235.8332090377808,"z":"acdffee6.4646","wires":[["3ffa27b1.735848","cbac044e.797f28"]]},{"id":"3ffa27b1.735848","type":"execute","name":"generate port-mirror-configuration url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.service`\"/>\n <parameter name=\"outputPath\" value=\"tmp.service-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$db.mapped-service-instance-id.forwarding-path-service-instance-id`\"/>\n","comments":"","outputs":1,"x":4285.00008392334,"y":2194.166865348816,"z":"acdffee6.4646","wires":[[]]},{"id":"cbac044e.797f28","type":"execute","name":"execute RestApiCallNode - get service","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.service-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-service\" />\n\n","comments":"","outputs":1,"x":4288.332931518555,"y":2280.8332109451294,"z":"acdffee6.4646","wires":[["8ee34d45.6e794","f93605ea.7e7b88"]]},{"id":"f93605ea.7e7b88","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":4516.666107177734,"y":2342.499878883362,"z":"acdffee6.4646","wires":[["a4725830.66d628"]]},{"id":"8ee34d45.6e794","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":4516.442153930664,"y":2235.3466358184814,"z":"acdffee6.4646","wires":[["dd9a7f75.ee19c"]]},{"id":"dd9a7f75.ee19c","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='data-error' value=\"`'Cannot find service instance ' + $db.mapped-service-instance-id.forwarding-path-service-instance-id + ' in MD-SAL'`\" />\n","comments":"","x":4710.000076293945,"y":2234.166537284851,"z":"acdffee6.4646","wires":[]},{"id":"a4725830.66d628","type":"switchNode","name":"switch forwarding-path_length","xml":"<switch test='`$mdsal-service.service[0].service-data.forwarding-paths.forwarding-path_length`'>\n","comments":"","outputs":1,"x":4720.000076293945,"y":2342.500033378601,"z":"acdffee6.4646","wires":[["f4cd3b16.9f1b48","e02ba6d7.e68a68","f2da480c.9764c8"]]},{"id":"f4cd3b16.9f1b48","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":4932.000106811523,"y":2278.7500410079956,"z":"acdffee6.4646","wires":[["7f12cf21.a3af1"]]},{"id":"e02ba6d7.e68a68","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":4933.250106811523,"y":2317.5000410079956,"z":"acdffee6.4646","wires":[["7f12cf21.a3af1"]]},{"id":"f2da480c.9764c8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":4930.393089294434,"y":2412.1429262161255,"z":"acdffee6.4646","wires":[["966b6bde.cc8f88"]]},{"id":"7f12cf21.a3af1","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='data-error' value=\"`'Service instance ' + $db.mapped-service-instance-id.forwarding-path-service-instance-id + ' has multiple VNFs but no forwarding paths were found'`\" />\n","comments":"","x":5120.750106811523,"y":2296.2500410079956,"z":"acdffee6.4646","wires":[]},{"id":"966b6bde.cc8f88","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":5059.143089294434,"y":2412.1429262161255,"z":"acdffee6.4646","wires":[["73c62547.358c5c","2c341601.f78f1a","18d9283c.3cd808"]]},{"id":"73c62547.358c5c","type":"set","name":"copy forwarding-paths to serv-insts array","xml":"<set>\n<parameter name='serv-cust[$serv-index].serv-insts[$tmp.serv-insts_length].forwarding-paths.'\n value='`$mdsal-service.service[0].service-data.forwarding-paths.`' />\n","comments":"","x":5296.666580200195,"y":2412.500033378601,"z":"acdffee6.4646","wires":[]},{"id":"2c341601.f78f1a","type":"set","name":"copy serv-inst to serv-insts array","xml":"<set>\n<parameter name='serv-cust[$serv-index].serv-insts[$tmp.serv-insts_length].' value='`$serv-inst.`' />\n","comments":"","x":5272,"y":2366,"z":"acdffee6.4646","wires":[]},{"id":"18d9283c.3cd808","type":"set","name":"increment serv-insts_length","xml":"<set>\n<parameter name='tmp.serv-insts_length' value='`$tmp.serv-insts_length + 1`' />\n","comments":"","x":5254.6904296875,"y":2459.416748046875,"z":"acdffee6.4646","wires":[]},{"id":"ab273d26.ee67d","type":"switchNode","name":"switch service_length == serv-cust_length","xml":"<switch test='`$service-paths.service-path[$sp-index].service_length == $serv-cust_length`'>\n","comments":"","outputs":1,"x":1463.3333282470703,"y":2587.6667375564575,"z":"acdffee6.4646","wires":[["57af92ff.0a268c"]]},{"id":"432943b9.13704c","type":"for","name":"for each service-path","xml":"<for index='sp-index' start='0' end='`$service-paths.service-path_length`' >\n","comments":"","outputs":1,"x":1183.3333282470703,"y":2588.6667375564575,"z":"acdffee6.4646","wires":[["ab273d26.ee67d"]]},{"id":"db0b5e4d.138fb","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1001.3333282470703,"y":2710.6667375564575,"z":"acdffee6.4646","wires":[["b67f5438.96b3a8","432943b9.13704c","ed2004a7.484e98"]]},{"id":"b67f5438.96b3a8","type":"set","name":"set found-service-path to false","xml":"<set>\n<parameter name='found-service-path' value='false' />\n","comments":"","x":1211.3333282470703,"y":2542.6667375564575,"z":"acdffee6.4646","wires":[]},{"id":"57af92ff.0a268c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1697.3333282470703,"y":2586.6667375564575,"z":"acdffee6.4646","wires":[["14f78ce9.5e1413"]]},{"id":"14f78ce9.5e1413","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1823.3333282470703,"y":2586.6667375564575,"z":"acdffee6.4646","wires":[["51e6f6dd.41b898","8e5d432a.80844"]]},{"id":"51e6f6dd.41b898","type":"set","name":"set found-service-path to true","xml":"<set>\n<parameter name='found-service-path' value='true' />\n","comments":"","x":2017.3333282470703,"y":2558.6667375564575,"z":"acdffee6.4646","wires":[]},{"id":"8e5d432a.80844","type":"break","name":"break","xml":"<break>\n","comments":"","x":1947.3333282470703,"y":2606.6667375564575,"z":"acdffee6.4646","wires":[]},{"id":"ed2004a7.484e98","type":"switchNode","name":"switch found-service-path","xml":"<switch test='`$found-service-path`'>\n","comments":"","outputs":1,"x":1197.3333282470703,"y":2922.6667375564575,"z":"acdffee6.4646","wires":[["902c3da4.38f8e","cc4f97d7.be3168"]]},{"id":"cc4f97d7.be3168","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1401.3333282470703,"y":3156.6667375564575,"z":"acdffee6.4646","wires":[["654073a0.8dc7dc"]]},{"id":"902c3da4.38f8e","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1383.3333282470703,"y":2702.6667375564575,"z":"acdffee6.4646","wires":[["95ceba9c.126508"]]},{"id":"95ceba9c.126508","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"`'No service paths found for path name '\n + $db.path-segment[0].path-name`\" />\n","comments":"","x":1573.3333282470703,"y":2702.6667375564575,"z":"acdffee6.4646","wires":[]},{"id":"6026a1f0.02df4","type":"switchNode","name":"switch service_length == serv-cust_length","xml":"<switch test='`$service-paths.service-path[$sp-index].service_length == $serv-cust_length`'>\n","comments":"","outputs":1,"x":2000,"y":3522,"z":"acdffee6.4646","wires":[["ce386471.0c3478"]]},{"id":"ce386471.0c3478","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2234,"y":3521,"z":"acdffee6.4646","wires":[["c64714d6.1fcac8"]]},{"id":"c64714d6.1fcac8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2360,"y":3521,"z":"acdffee6.4646","wires":[["ec6851e3.24d41","f9f23fe5.c832e","ee78a452.895eb8"]]}] \ No newline at end of file
+[{"id":"38b3fdb6.1bce32","type":"dgstart","name":"DGSTART","outputs":1,"x":101.66666412353516,"y":83.33332824707031,"z":"acdffee6.4646","wires":[["99e272a4.4e9a8"]]},{"id":"99e272a4.4e9a8","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":216.95236206054688,"y":123.5714340209961,"z":"acdffee6.4646","wires":[["1e63d80b.85a448"]]},{"id":"1e63d80b.85a448","type":"method","name":"method getpathsegment-create-composite-path","xml":"<method rpc='getpathsegment-create-composite-path' mode='sync'>\n","comments":"","outputs":1,"x":221.0952911376953,"y":164.3333225250244,"z":"acdffee6.4646","wires":[["df2ed6c2.cce068"]]},{"id":"1c6cd94a.dfdc47","type":"comment","name":"getpathsegment-create-composite-path","info":"","comments":"","x":496.0115203857422,"y":30.9196720123291,"z":"acdffee6.4646","wires":[]},{"id":"df2ed6c2.cce068","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":304.5000534057617,"y":303.46728324890137,"z":"acdffee6.4646","wires":[["fc83ec6a.1d401","d895c970.3dbc78"]]},{"id":"fc83ec6a.1d401","type":"get-resource","name":"get-resource PATH_SEGMENT","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from PATH_SEGMENT WHERE service_uuid = $getpathsegment-topology-operation-input.service-information.onap-model-information.model-uuid\n AND path_name = $db.forwarding-path[$path-index].path-name ORDER BY path_segment_seq'\n pfx='db.path-segment[]'>\n\n","comments":"","outputs":1,"x":527.6190452575684,"y":373.0952377319336,"z":"acdffee6.4646","wires":[["7ff0a241.207e8c","8b411eeb.03fd7","e62cb2cc.8b1b1"]]},{"id":"c64c7acf.8db458","type":"for","name":"for each path segment","xml":"<for index='path-segment-index' start='0' end='`$db.path-segment_length`' >\n","comments":"","outputs":1,"x":560.7738571166992,"y":557.4404888153076,"z":"acdffee6.4646","wires":[["c804b632.fcc3c8"]]},{"id":"c804b632.fcc3c8","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":758.9286117553711,"y":557.261869430542,"z":"acdffee6.4646","wires":[["4637dda4.0531c4","c55591ca.552ba"]]},{"id":"227d76b8.b8f89a","type":"set","name":"set serv-cust_length to 0","xml":"<set>\n<parameter name='serv-cust_length' value='0' />\n","comments":"","x":569.1667022705078,"y":509.58334255218506,"z":"acdffee6.4646","wires":[]},{"id":"4637dda4.0531c4","type":"set","name":"add source ids to serv-cust[]","xml":"<set>\n<parameter name='serv-cust[$serv-cust_length].id' value='`$db.path-segment[$path-segment-index].source-association-uuid`' />\n<parameter name='serv-cust_length' value='`$serv-cust_length + 1`' />\n","comments":"","x":984.1667098999023,"y":535.8333425521851,"z":"acdffee6.4646","wires":[]},{"id":"c55591ca.552ba","type":"switchNode","name":"is this the last path-segment?","xml":"<switch test='`$path-segment-index == ( $db.path-segment_length - 1) `'>\n","comments":"","outputs":1,"x":987.9167175292969,"y":580.8333435058594,"z":"acdffee6.4646","wires":[["f40592ef.6d056"]]},{"id":"f40592ef.6d056","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1184.1667194366455,"y":580.5833435058594,"z":"acdffee6.4646","wires":[["65efc56f.f80dcc"]]},{"id":"65efc56f.f80dcc","type":"set","name":"add target ids to serv-cust[]","xml":"<set>\n<parameter name='serv-cust[$serv-cust_length].id' value='`$db.path-segment[$path-segment-index].target-association-uuid`' />\n<parameter name='serv-cust_length' value='`$serv-cust_length + 1`' />\n","comments":"","x":1373.1667137145996,"y":579.8333435058594,"z":"acdffee6.4646","wires":[]},{"id":"d6d2ff5a.a38e6","type":"comment","name":"create list of service customization/invariant ids","info":"","comments":"","x":750.0000495910645,"y":460.41664600372314,"z":"acdffee6.4646","wires":[]},{"id":"eba93f08.848f6","type":"get-resource","name":"custom query - get runtime service-instances","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n\tresource=\"custom-query\"\n\tkey=\"format = 'resource'\"\n\tforce=\"true\"\n\tlocal-only=\"false\"\n\tpfx=\"aai.service-instances\" >\n\t<parameter name=\"start[0]\" value=\"`'nodes/service-instances?model-invariant-id=' + $serv-cust[$serv-index].inv-id`\" />\n\t<parameter name=\"start_length\" value=\"1\" />\n","comments":"","outputs":1,"x":1164.1666870117188,"y":815.5833110809326,"z":"acdffee6.4646","wires":[["4c07202b.a6ebd","465c9f69.063cf","dc42dfdf.fdb5"]]},{"id":"465c9f69.063cf","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1425.9129028320312,"y":806.4841794967651,"z":"acdffee6.4646","wires":[["e9829c01.c3518"]]},{"id":"4c07202b.a6ebd","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1434.8414993286133,"y":764.7699127197266,"z":"acdffee6.4646","wires":[["22fcdcd6.409e54"]]},{"id":"d895c970.3dbc78","type":"set","name":"set match-type","xml":"<set>\n<parameter name='match-type' value='network-name' />\n","comments":"","x":475.00000762939453,"y":243.33336734771729,"z":"acdffee6.4646","wires":[]},{"id":"3337a2c8.4f2c0e","type":"for","name":"for each service","xml":"<for index='serv-index' start='0' end='`$serv-cust_length`' >\n","comments":"","outputs":1,"x":542.9166564941406,"y":795.8333034515381,"z":"acdffee6.4646","wires":[["ea262156.5bc25"]]},{"id":"ba80debf.cd0aa","type":"for","name":"for each runtime service-instance","xml":"<for index='runtime-index' start='0' end='`$aai.service-instances.results_length`' >\n","comments":"","outputs":1,"x":1787.3809661865234,"y":897.261890411377,"z":"acdffee6.4646","wires":[["f4f23919.fbf798"]]},{"id":"37e396a3.2783fa","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":1601.487964630127,"y":1169.583387374878,"z":"acdffee6.4646","wires":[["e16fa584.ce8668","c9267106.d99d1","b7b866f.22cfd98","9f400084.68537","a4663c40.d0b5d"]]},{"id":"22fcdcd6.409e54","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"`'Unable to find runtime service instances for invariant UUID ' + $serv-cust[$serv-index].inv-id`\" />\n","comments":"","x":1639.1667098999023,"y":764.5833187103271,"z":"acdffee6.4646","wires":[]},{"id":"e9829c01.c3518","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"`'System error finding runtime service instances for customization UUID ' + $serv-cust[$serv-index].inv-id`\" />\n","comments":"","x":1637.9166870117188,"y":805.8333110809326,"z":"acdffee6.4646","wires":[]},{"id":"dc42dfdf.fdb5","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1427.5595741271973,"y":895.6547050476074,"z":"acdffee6.4646","wires":[["1a046dd0.664552"]]},{"id":"1a046dd0.664552","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":1568.8095741271973,"y":896.9047050476074,"z":"acdffee6.4646","wires":[["ba80debf.cd0aa","5a25eaf8.84c624","2fed2a61.3ba6d6"]]},{"id":"c9267106.d99d1","type":"execute","name":"generate port-mirror-configuration url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.service`\"/>\n <parameter name=\"outputPath\" value=\"tmp.service-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$serv-inst.service-instance-id`\"/>\n","comments":"","outputs":1,"x":1911.4878692626953,"y":1190.8334407806396,"z":"acdffee6.4646","wires":[[]]},{"id":"b7b866f.22cfd98","type":"execute","name":"execute RestApiCallNode - get service","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.service-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-service\" />\n\n","comments":"","outputs":1,"x":1918.8212051391602,"y":1473.9286651611328,"z":"acdffee6.4646","wires":[["44737e00.fd61a","e1d027ae.6e1bf8"]]},{"id":"44737e00.fd61a","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2181.367099761963,"y":1296.1292266845703,"z":"acdffee6.4646","wires":[["73b87896.db1488"]]},{"id":"e1d027ae.6e1bf8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2182.809181213379,"y":1772.3094692230225,"z":"acdffee6.4646","wires":[["e72fa4b8.6bb8f8"]]},{"id":"8d022a9b.038888","type":"comment","name":"Is this service in GENERIC-RESOURCE-API?","info":"","comments":"","x":1925.2497940063477,"y":1426.4286623001099,"z":"acdffee6.4646","wires":[]},{"id":"e16fa584.ce8668","type":"set","name":"clear mdsal-service and serv-inst.api","xml":"<set>\n<parameter name='mdsal-service.' value='' />\n<parameter name='serv-inst.api' value='' />\n","comments":"","x":1907.0712242126465,"y":1139.9405155181885,"z":"acdffee6.4646","wires":[]},{"id":"8786ac57.03e15","type":"set","name":"set serv-inst.service-instance-id","xml":"<set>\n<parameter name='serv-inst.service-instance-id' value='`$aai.service-instances.results[$runtime-index].service-instance.service-instance-id`' />\n","comments":"","x":2592.880962371826,"y":814.6428813934326,"z":"acdffee6.4646","wires":[]},{"id":"73b87896.db1488","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":2335.2379302978516,"y":1295.0833110809326,"z":"acdffee6.4646","wires":[["bae35c98.23485"]]},{"id":"bae35c98.23485","type":"switchNode","name":"switch vnf_length","xml":"<switch test='`$mdsal-service.service[0].service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":2520.237953186035,"y":1293.8333282470703,"z":"acdffee6.4646","wires":[["5de50820.6365a8","6a33778b.f0d2b8","8b08a0fc.3d573","156859cc.f57d36"]]},{"id":"5de50820.6365a8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2698.988010406494,"y":1145.8333530426025,"z":"acdffee6.4646","wires":[["5d43b7a0.cc8368"]]},{"id":"6a33778b.f0d2b8","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":2700.238010406494,"y":1184.5833530426025,"z":"acdffee6.4646","wires":[["5d43b7a0.cc8368"]]},{"id":"8b08a0fc.3d573","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2700.737949371338,"y":1520.8333282470703,"z":"acdffee6.4646","wires":[["7f9faf98.11444"]]},{"id":"7f9faf98.11444","type":"switchNode","name":"switch forwarding-path_length","xml":"<switch test='`$mdsal-service.service[0].service-data.forwarding-paths.forwarding-path_length`'>\n","comments":"","outputs":1,"x":2916.987953186035,"y":1522.0833282470703,"z":"acdffee6.4646","wires":[["b12a45c2.9c00f8","df779983.f9ee18","efeee58f.366df8"]]},{"id":"156859cc.f57d36","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":2703.988010406494,"y":1324.8333549499512,"z":"acdffee6.4646","wires":[["d321c3e5.b08ea"]]},{"id":"b12a45c2.9c00f8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":3128.9879837036133,"y":1458.3333358764648,"z":"acdffee6.4646","wires":[["6574fc05.7aa8d4"]]},{"id":"df779983.f9ee18","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":3130.2379837036133,"y":1497.0833358764648,"z":"acdffee6.4646","wires":[["6574fc05.7aa8d4"]]},{"id":"efeee58f.366df8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3127.3809661865234,"y":1591.7262210845947,"z":"acdffee6.4646","wires":[["cbc2b125.4a032"]]},{"id":"5d43b7a0.cc8368","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='data-error' value=\"`'Service instance ' + $si.service-instance-id + ' has no VNFs, skipping'`\" />\n","comments":"","x":2897.7379837036133,"y":1163.3333358764648,"z":"acdffee6.4646","wires":[]},{"id":"6574fc05.7aa8d4","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='data-error' value=\"`'Service instance ' + $serv-inst.service-instance-id + ' has multiple VNFs but no forwarding paths were found'`\" />\n","comments":"","x":3317.7379837036133,"y":1475.8333358764648,"z":"acdffee6.4646","wires":[]},{"id":"389f4f59.b5385","type":"call","name":"call GENERIC-RESOURCE-API:getpathsegment-populate-from-grapi","xml":"<call module='GENERIC-RESOURCE-API' rpc='getpathsegment-populate-from-grapi' mode='sync' >\n","comments":"","outputs":1,"x":3186.737953186035,"y":1274.0833282470703,"z":"acdffee6.4646","wires":[[]]},{"id":"ed8af0c2.a5e1e","type":"call","name":"call GENERIC-RESOURCE-API:getpathsegment-populate-from-vnfapi","xml":"<call module='GENERIC-RESOURCE-API' rpc='getpathsegment-populate-from-vnfapi' mode='sync' >\n","comments":"","outputs":1,"x":2647.80948638916,"y":1723.0832061767578,"z":"acdffee6.4646","wires":[[]]},{"id":"a8c16a6d.0d2f18","type":"success","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2661.2022552490234,"y":1910.5475997924805,"z":"acdffee6.4646","wires":[["ac5e9274.a71eb"]]},{"id":"23ce8b1d.277d04","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2658.7022666931152,"y":1776.6310663223267,"z":"acdffee6.4646","wires":[["1300cf7.befc831"]]},{"id":"1300cf7.befc831","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='data-error' value=\"`'Failure finding service instance ' + $si.service-instance-id + ' in either GENERIC-REOURCE-API or VNF-API'`\" />\n","comments":"","x":2872.452236175537,"y":1775.1310510635376,"z":"acdffee6.4646","wires":[]},{"id":"ac5e9274.a71eb","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2812.4525032043457,"y":1909.2975997924805,"z":"acdffee6.4646","wires":[["bab97280.4fcff"]]},{"id":"3f21a433.f89dbc","type":"set","name":"copy serv-inst to serv-insts array","xml":"<set>\n<parameter name='serv-cust[$serv-index].serv-insts[$tmp.serv-insts_length].' value='`$serv-inst.`' />\n","comments":"","x":3074.237953186035,"y":1327.8333282470703,"z":"acdffee6.4646","wires":[]},{"id":"f723823c.14d35","type":"set","name":"increment serv-insts_length","xml":"<set>\n<parameter name='tmp.serv-insts_length' value='`$tmp.serv-insts_length + 1`' />\n","comments":"","x":3055.487922668457,"y":1382.833309173584,"z":"acdffee6.4646","wires":[]},{"id":"d321c3e5.b08ea","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":2853.9879837036133,"y":1324.5833358764648,"z":"acdffee6.4646","wires":[["389f4f59.b5385","3f21a433.f89dbc","f723823c.14d35"]]},{"id":"5a25eaf8.84c624","type":"set","name":"set tmp.serv-insts_length to 0","xml":"<set>\n<parameter name='tmp.serv-insts_length' value='0' />\n","comments":"","x":1781.1309967041016,"y":848.1547393798828,"z":"acdffee6.4646","wires":[]},{"id":"e72fa4b8.6bb8f8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2309.297294616699,"y":1780.047555923462,"z":"acdffee6.4646","wires":[["ed8af0c2.a5e1e","78b047cf.ed86c8"]]},{"id":"78b047cf.ed86c8","type":"switchNode","name":"switch serv-inst.api","xml":"<switch test='`$serv-inst.api`'>\n","comments":"","outputs":1,"x":2492.393165588379,"y":1845.1666173934937,"z":"acdffee6.4646","wires":[["23ce8b1d.277d04","a8c16a6d.0d2f18"]]},{"id":"2de86e6.3962e92","type":"set","name":"copy serv-inst to serv-insts array","xml":"<set>\n<parameter name='serv-cust[$serv-index].serv-insts[$tmp.serv-insts_length].' value='`$serv-inst.`' />\n","comments":"","x":3539.0593872070312,"y":2006.5000267028809,"z":"acdffee6.4646","wires":[]},{"id":"f4f23919.fbf798","type":"switchNode","name":"switch orchestration-status","xml":"<switch test='`$aai.service-instances.results[$runtime-index].service-instance.orchestration-status`'>\n","comments":"","outputs":1,"x":2059.7024688720703,"y":897.0832557678223,"z":"acdffee6.4646","wires":[["83f502d6.2f5a4"]]},{"id":"83f502d6.2f5a4","type":"outcome","name":"Active","xml":"<outcome value='Active'>\n","comments":"","outputs":1,"x":2254.1665954589844,"y":895.8332214355469,"z":"acdffee6.4646","wires":[["442aff0f.a1283"]]},{"id":"1398c294.3f952d","type":"for","name":"for each service","xml":"<for index='serv-index' start='0' end='`$serv-cust_length`' >\n","comments":"","outputs":1,"x":539.583366394043,"y":668.7500200271606,"z":"acdffee6.4646","wires":[["ecfee624.daec78"]]},{"id":"f6adfe96.32d5f","type":"comment","name":"convert customization uuid to invariant uuid","info":"","comments":"","x":668.3334045410156,"y":626.250018119812,"z":"acdffee6.4646","wires":[]},{"id":"15831d68.36e8b3","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1121.2024307250977,"y":625.3093452453613,"z":"acdffee6.4646","wires":[["be78a9fd.371368"]]},{"id":"745ebab0.1a84e4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1127.2738418579102,"y":666.0950517654419,"z":"acdffee6.4646","wires":[["dfab331.23ebcd"]]},{"id":"ecfee624.daec78","type":"get-resource","name":"get-resource SERVICE_PROXY, SERVICE_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n key='select sm.invariant_uuid\n from SERVICE_PROXY sp, SERVICE_MODEL sm\n where sp.source_service_uuid = sm.service_uuid\n and sp.customization_uuid = $serv-cust[$serv-index].id'\n pfx='db'>\n","comments":"","outputs":1,"x":844.5238189697266,"y":668.5714359283447,"z":"acdffee6.4646","wires":[["15831d68.36e8b3","745ebab0.1a84e4","577c9bbc.66ccc4"]]},{"id":"577c9bbc.66ccc4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1122.083351135254,"y":707.5000200271606,"z":"acdffee6.4646","wires":[["1848871c.fbafd9"]]},{"id":"1848871c.fbafd9","type":"set","name":"store invariant id","xml":"<set>\n<parameter name='serv-cust[$serv-index].inv-id' value='`$db.invariant-uuid`' />\n","comments":"","x":1287.0833587646484,"y":707.5000200271606,"z":"acdffee6.4646","wires":[]},{"id":"be78a9fd.371368","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"`'Failure reading SERVICE_PROXY and SERVICE_MODEL for customization uuid ' + $serv-cust[$serv-index].id`\" />\n","comments":"","x":1315.8333549499512,"y":625.0000190734863,"z":"acdffee6.4646","wires":[]},{"id":"dfab331.23ebcd","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"`'Cannot find entries in SERVICE_PROXY and SERVICE_MODEL for customization uuid ' + $serv-cust[$serv-index].id`\" />\n","comments":"","x":1315.8333358764648,"y":665.0000104904175,"z":"acdffee6.4646","wires":[]},{"id":"ea262156.5bc25","type":"switchNode","name":"switch invariant uuid","xml":"<switch test='`$serv-cust[$serv-index].inv-id`'>\n","comments":"","outputs":1,"x":741.6666793823242,"y":794.5833110809326,"z":"acdffee6.4646","wires":[["6e5ea8a8.3f7578","38fd826b.e7840e"]]},{"id":"6e5ea8a8.3f7578","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":907.9166831970215,"y":765.8333110809326,"z":"acdffee6.4646","wires":[["458e60e8.0fa83"]]},{"id":"38fd826b.e7840e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":908.7381553649902,"y":816.1192016601562,"z":"acdffee6.4646","wires":[["eba93f08.848f6"]]},{"id":"458e60e8.0fa83","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1044.1666831970215,"y":765.0833101272583,"z":"acdffee6.4646","wires":[[]]},{"id":"3b868648.17a23a","type":"call","name":"call GENERIC-RESOURCE-API:getpathsegment-composite-match-pair","xml":"<call module='GENERIC-RESOURCE-API' rpc='getpathsegment-composite-match-pair' mode='sync' >\n","comments":"","outputs":1,"x":687.9287109375,"y":2361.2736377716064,"z":"acdffee6.4646","wires":[[]]},{"id":"cbc2b125.4a032","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":3256.1309661865234,"y":1591.7262210845947,"z":"acdffee6.4646","wires":[["e63540a5.81689","c13e34b7.f42fb8","a14b9b6d.2bbee8","7ace4a44.fb42f4"]]},{"id":"e63540a5.81689","type":"set","name":"copy forwarding-paths to serv-insts array","xml":"<set>\n<parameter name='serv-cust[$serv-index].serv-insts[$tmp.serv-insts_length].forwarding-paths.'\n value='`$mdsal-service.service[0].service-data.forwarding-paths.`' />\n","comments":"","x":3503.988082885742,"y":1615.2975959777832,"z":"acdffee6.4646","wires":[]},{"id":"c13e34b7.f42fb8","type":"set","name":"increment serv-insts_length","xml":"<set>\n<parameter name='tmp.serv-insts_length' value='`$tmp.serv-insts_length + 1`' />\n","comments":"","x":3462.5592651367188,"y":1662.0834131240845,"z":"acdffee6.4646","wires":[]},{"id":"a14b9b6d.2bbee8","type":"call","name":"call GENERIC-RESOURCE-API:getpathsegment-populate-from-grapi","xml":"<call module='GENERIC-RESOURCE-API' rpc='getpathsegment-populate-from-grapi' mode='sync' >\n","comments":"","outputs":1,"x":3588.2736282348633,"y":1527.0833358764648,"z":"acdffee6.4646","wires":[[]]},{"id":"7ace4a44.fb42f4","type":"set","name":"copy serv-inst to serv-insts array","xml":"<set>\n<parameter name='serv-cust[$serv-index].serv-insts[$tmp.serv-insts_length].' value='`$serv-inst.`' />\n","comments":"","x":3475.4166946411133,"y":1568.5119247436523,"z":"acdffee6.4646","wires":[]},{"id":"9f400084.68537","type":"set","name":"clear serv-inst","xml":"<set>\n<parameter name='serv-inst.' value='' />\n","comments":"","x":1837.9879150390625,"y":1518.511981010437,"z":"acdffee6.4646","wires":[]},{"id":"2fed2a61.3ba6d6","type":"set","name":"set final serv-insts_length","xml":"<set>\n<parameter name='serv-cust[$serv-index].serv-insts_length' value='`$tmp.serv-insts_length`' />\n","comments":"","x":1765.4167137145996,"y":942.7975521087646,"z":"acdffee6.4646","wires":[]},{"id":"e2bb1296.6a77f","type":"comment","name":"Create forwarding-path structure","info":"","comments":"","x":1804.2026138305664,"y":2759.249895095825,"z":"acdffee6.4646","wires":[]},{"id":"9c1deb3.fce3a18","type":"switchNode","name":"switch service-paths.service-path_length","xml":"<switch test='`$service-paths.service-path_length`'>\n","comments":"","outputs":1,"x":588.7024993896484,"y":2585.0833568573,"z":"acdffee6.4646","wires":[["c17848c4.7aa328","891625b0.f7b498","2b7b5767.caf788"]]},{"id":"c17848c4.7aa328","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":868.7024803161621,"y":2441.7497968673706,"z":"acdffee6.4646","wires":[["9234ee5.d733b1"]]},{"id":"891625b0.f7b498","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":869.9524803161621,"y":2480.4997968673706,"z":"acdffee6.4646","wires":[["9234ee5.d733b1"]]},{"id":"2b7b5767.caf788","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":865.9524955749512,"y":2712.0001287460327,"z":"acdffee6.4646","wires":[["db0b5e4d.138fb"]]},{"id":"9234ee5.d733b1","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1002.0358390808105,"y":2455.0831298828125,"z":"acdffee6.4646","wires":[[]]},{"id":"9957ee7a.eb839","type":"set","name":"set top-level data","xml":"<set>\n<parameter name='forwarding-path.forwarding-path-name' value='`$db.path-segment[0].path-name`' />\n<parameter name='forwarding-path.forwarding-path-type' value='Service' />\n<parameter name='forwarding-path.onap-model-information.model-name' value='`$db.path-segment[0].path-name`' />\n","comments":"","x":1715.0359230041504,"y":2846.749963760376,"z":"acdffee6.4646","wires":[]},{"id":"2464da2e.bc2576","type":"execute","name":"generate forwarding-path-id","xml":"<execute plugin=\"org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils\" method=\"generateUUID\" >\n<parameter name=\"ctx-destination\" value=\"forwarding-path.forwarding-path-id\" />\n","comments":"","outputs":1,"x":1747.1192169189453,"y":2800.916626930237,"z":"acdffee6.4646","wires":[[]]},{"id":"5d113599.9797dc","type":"set","name":"copy service-path","xml":"<set>\n<parameter name='forwarding-path.service-paths.' value='`$service-paths.`' />\n","comments":"","x":1713.3692474365234,"y":2891.7502098083496,"z":"acdffee6.4646","wires":[]},{"id":"654073a0.8dc7dc","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1525.0359649658203,"y":3155.0832328796387,"z":"acdffee6.4646","wires":[["2464da2e.bc2576","9957ee7a.eb839","5d113599.9797dc","7ecab0fa.15895","76d060fc.5c71a","94003a26.69b068","532dd116.0d3c4"]]},{"id":"a4663c40.d0b5d","type":"switchNode","name":"switch runtime-index","xml":"<switch test='`$runtime-index`'>\n","comments":"","outputs":1,"x":1859.7022666931152,"y":1011.8452968597412,"z":"acdffee6.4646","wires":[["4db5c1dc.9f95c"]]},{"id":"4db5c1dc.9f95c","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":2029.7022972106934,"y":1011.8453140258789,"z":"acdffee6.4646","wires":[["dcb4004e.9356a"]]},{"id":"dcb4004e.9356a","type":"set","name":"save service.service-role","xml":"<set>\n<parameter name='service.service-role' value='`$aai.service-instances.results[0].service-instance.service-role`' />\n","comments":"","x":2208.2736206054688,"y":1011.8452968597412,"z":"acdffee6.4646","wires":[]},{"id":"442aff0f.a1283","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2380.416763305664,"y":895.4166278839111,"z":"acdffee6.4646","wires":[["37e396a3.2783fa","efbbd2cc.0e547","8786ac57.03e15"]]},{"id":"efbbd2cc.0e547","type":"switchNode","name":"switch output-global-customer-id","xml":"<switch test='`$output-global-customer-id`'>\n","comments":"","outputs":1,"x":2595.4166717529297,"y":860.4166126251221,"z":"acdffee6.4646","wires":[["9b84fbe4.e396d8"]]},{"id":"9b84fbe4.e396d8","type":"outcome","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2802.0833892822266,"y":858.7499856948853,"z":"acdffee6.4646","wires":[["6b285851.2f4b58"]]},{"id":"30bb031c.093bcc","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":3375.416572570801,"y":855.4166278839111,"z":"acdffee6.4646","wires":[["b34e010d.49543","966e7225.52122"]]},{"id":"6b285851.2f4b58","type":"save","name":"custom query: get service instance","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"custom-query\"\n key=\"format = 'resource_and_url'\"\n force=\"true\"\n local-only=\"false\"\n pfx=\"tmp.AnAI-data.si\">\n\t<parameter name=\"start[0]\" value=\"`'nodes/service-instance/' + $serv-inst.service-instance-id `\" />\n\t<parameter name=\"start_length\" value=\"1\" />\n","comments":"","outputs":1,"x":3020.416534423828,"y":857.083399772644,"z":"acdffee6.4646","wires":[["5e0c0bf4.dca7b4"]]},{"id":"b34e010d.49543","type":"execute","name":"execute split","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n\t<parameter name=\"original_string\" value=\"`$tmp.AnAI-data.si.results[0].url`\" />\n\t<parameter name=\"regex\" value=\"/\"/>\n\t<parameter name=\"limit\" value=\"11\" />\n\t<parameter name=\"ctx_memory_result_key\" value=\"split\" />\n","comments":"","outputs":1,"x":3528.749973297119,"y":835.4167575836182,"z":"acdffee6.4646","wires":[[]]},{"id":"5e0c0bf4.dca7b4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3242.0832595825195,"y":856.7500123977661,"z":"acdffee6.4646","wires":[["30bb031c.093bcc"]]},{"id":"966e7225.52122","type":"set","name":"set output-global-customer-id, etc","xml":"<set>\n<parameter name='output-global-customer-id' value='`$split[6]`' />\n<parameter name='output-service-type' value='`$split[9]`' />\n<parameter name='output-service-role' value='`$tmp.AnAI-data.si.results[0].service-instance.service-role`' />\n","comments":"","x":3595.416763305664,"y":880.4166374206543,"z":"acdffee6.4646","wires":[]},{"id":"7d31078f.efb3d8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2128.60733795166,"y":3068.8931226730347,"z":"acdffee6.4646","wires":[["87ecc4ba.953798","e1f74301.3a592","ea9cb947.2f8788","7177f03.da2611","960587e2.909438"]]},{"id":"87ecc4ba.953798","type":"execute","name":"generate service-instance-id","xml":"<execute plugin=\"org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils\" method=\"generateUUID\" >\n<parameter name=\"ctx-destination\" value=\"tmp.service-instance-id\" />\n","comments":"","outputs":1,"x":2335.274076461792,"y":2968.1788692474365,"z":"acdffee6.4646","wires":[[]]},{"id":"14ba220e.0a427e","type":"comment","name":"Make a new service instance in GR-API","info":"","comments":"","x":2441.5239963531494,"y":2931.0953826904297,"z":"acdffee6.4646","wires":[]},{"id":"7177f03.da2611","type":"save","name":"save service-instance to A&AI","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"service-instance\" \n\tkey=\"customer.global-customer-id = $output-global-customer-id\n\t AND service-subscription.service-type = $output-service-type\n\t AND service-instance.service-instance-id = $tmp.service-instance-id\" >\n<parameter name=\"service-instance-id\" value=\"`$tmp.service-instance-id`\" />\n<parameter name=\"global-customer-id\" value=\"`$output-global-customer-id`\" />\n<parameter name=\"service-type\" value=\"`$output-service-type`\" />\n<parameter name=\"service-role\" value=\"`$output-service-role`\" />\n","comments":"","outputs":1,"x":2339.202896118164,"y":3150.0238361358643,"z":"acdffee6.4646","wires":[["2ad23b25.4eac74","8b691431.cc9278"]]},{"id":"83430cdc.a419d","type":"comment","name":"Make a new service instance in A&AI","info":"","comments":"","x":2429.917154312134,"y":3092.16690826416,"z":"acdffee6.4646","wires":[]},{"id":"ea9cb947.2f8788","type":"execute","name":"execute RestApiCallNode - PUT service-instance","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.csm.serviceinstance.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.service-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-sr\" />\n\n","comments":"","outputs":1,"x":2400.2742023468018,"y":3054.845375061035,"z":"acdffee6.4646","wires":[["97c9808b.9352c"]]},{"id":"e1f74301.3a592","type":"execute","name":"generate service-instance url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.service`\"/>\n <parameter name=\"outputPath\" value=\"tmp.service-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.service-instance-id`\"/>\n","comments":"","outputs":1,"x":2336.5242023468018,"y":3012.345374107361,"z":"acdffee6.4646","wires":[[]]},{"id":"7ecab0fa.15895","type":"switchNode","name":"switch output-service-instance-id","xml":"<switch test='`$output-service-instance-id`'>\n","comments":"","outputs":1,"x":1767.4168243408203,"y":3076.5121965408325,"z":"acdffee6.4646","wires":[["6bc7823b.9fccbc","f3d20003.45381"]]},{"id":"7ff0a241.207e8c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":738.7499389648438,"y":328.75,"z":"acdffee6.4646","wires":[["ae348eba.10a95"]]},{"id":"8b411eeb.03fd7","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":747.3213691711426,"y":372.0357131958008,"z":"acdffee6.4646","wires":[["6abf5986.be9818"]]},{"id":"ae348eba.10a95","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":892.0120735168457,"y":327.0715398788452,"z":"acdffee6.4646","wires":[["4a5f6f0b.dcc33"]]},{"id":"6abf5986.be9818","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":892.0120964050293,"y":372.07152938842773,"z":"acdffee6.4646","wires":[["8def3ed6.72da5"]]},{"id":"4a5f6f0b.dcc33","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"`'System error reading PATH_SEGMENT table for uuid '\n + $getpathsegment-topology-operation-input.service-information.onap-model-information.model-uuid\n + ' and path '\n + $db.forwarding-path[$path-index].path-name`\" />\n","comments":"","x":1092.0122184753418,"y":325.4048738479614,"z":"acdffee6.4646","wires":[]},{"id":"8def3ed6.72da5","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"`'No entries in PATH_SEGMENT table for uuid '\n + $getpathsegment-topology-operation-input.service-information.onap-model-information.model-uuid\n + ' and path '\n + $db.forwarding-path[$path-index].path-name`\" />\n","comments":"","x":1092.012035369873,"y":372.07152938842773,"z":"acdffee6.4646","wires":[]},{"id":"e62cb2cc.8b1b1","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":743.6787948608398,"y":415.4048881530762,"z":"acdffee6.4646","wires":[["766a7c4c.6db704"]]},{"id":"766a7c4c.6db704","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":113.6309585571289,"y":1673.2737884521484,"z":"acdffee6.4646","wires":[["227d76b8.b8f89a","c64c7acf.8db458","1398c294.3f952d","3337a2c8.4f2c0e","3b868648.17a23a","9c1deb3.fce3a18","31223e46.c39562"]]},{"id":"6bc7823b.9fccbc","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1988.607292175293,"y":3055.5597352981567,"z":"acdffee6.4646","wires":[["7d31078f.efb3d8"]]},{"id":"f3d20003.45381","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":1988.4287033081055,"y":3097.1668796539307,"z":"acdffee6.4646","wires":[["7d31078f.efb3d8"]]},{"id":"960587e2.909438","type":"set","name":"set output-service-instance-id","xml":"<set>\n<parameter name='output-service-instance-id' value='`$tmp.service-instance-id`' />\n","comments":"","x":2334.797737121582,"y":3214.6070919036865,"z":"acdffee6.4646","wires":[]},{"id":"94003a26.69b068","type":"execute","name":"execute RestApiCallNode - PUT forwarding-path","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.forwardingpath.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.fp-url + $forwarding-path.forwarding-path-id`' />\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-fp\" />\n\n","comments":"","outputs":1,"x":1810.0359344482422,"y":3339.3693075180054,"z":"acdffee6.4646","wires":[["e3e2ddf6.f153f","b2430abe.dc8828"]]},{"id":"e3e2ddf6.f153f","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2080.5224685668945,"y":3363.6175785064697,"z":"acdffee6.4646","wires":[["aac11982.8688f8"]]},{"id":"b2430abe.dc8828","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2072.951103210449,"y":3322.1175985336304,"z":"acdffee6.4646","wires":[["aac11982.8688f8"]]},{"id":"aac11982.8688f8","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"Failure writing forwarding-path to MD-SAL\" />\n","comments":"","x":2292.5359420776367,"y":3336.8693075180054,"z":"acdffee6.4646","wires":[]},{"id":"76d060fc.5c71a","type":"execute","name":"generate forwarding-path url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.forwarding-path`\"/>\n <parameter name=\"outputPath\" value=\"tmp.fp-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$output-service-instance-id`\"/>\n","comments":"","outputs":1,"x":1747.952766418457,"y":3282.285427093506,"z":"acdffee6.4646","wires":[[]]},{"id":"ec6851e3.24d41","type":"save","name":"save forwarding-path to A&AI","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"forwarding-path\" \n\tkey=\"forwarding-path.forwarding-path-id = $forwarding-path.service-paths.service-path[$sp-index].service-path-instance-id\" >\n<parameter name=\"forwarding-path-id\" value=\"`$forwarding-path.service-paths.service-path[$sp-index].service-path-instance-id`\" />\n<parameter name=\"forwarding-path-name\" value=\"`$forwarding-path.service-paths.service-path[$sp-index].service-path-instance-name`\" />\n<parameter name=\"selflink\" value=\"`'/restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $output-service-instance-id\n + '/forwarding-paths/forwarding-path/'\n + $forwarding-path.forwarding-path-id\n + '/services-paths/service-path/'\n + $forwarding-path.service-paths.service-path[$sp-index].service-path-instance-id`\" />\n","comments":"","outputs":1,"x":2564.072067260742,"y":3421.226315498352,"z":"acdffee6.4646","wires":[["782723e.d6f5edc","173a4200.c682ae"]]},{"id":"f9f23fe5.c832e","type":"save","name":"save forwarding-path relationship to service-instance","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"forwarding-path:relationship-list\"\n key=\"forwarding-path.forwarding-path-id = $forwarding-path.service-paths.service-path[$sp-index].service-path-instance-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n <parameter name=\"relationship-list.relationship[0].related-to\" value=\"service-instance\" />\n <parameter name=\"relationship-list.relationship[0].related-link\"\n value=\"`'/aai/v$/business/customers/customer/'\n + $output-global-customer-id\n + '/service-subscriptions/service-subscription/'\n + $output-service-type\n + '/service-instances/service-instance/'\n + $output-service-instance-id`\" />\n","comments":"","outputs":1,"x":2635.73876953125,"y":3501.46435546875,"z":"acdffee6.4646","wires":[["c1b3e443.b892d8","a4072ca.00fd3d"]]},{"id":"2f92c949.4d6476","type":"for","name":"for each vnf","xml":"<for index='vnf-index' start='0' end='`$forwarding-path.service-paths.service-path[$sp-index].service[$service-index].vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":2725.500457763672,"y":3630.274257659912,"z":"acdffee6.4646","wires":[["d2f257bf.d8fd58"]]},{"id":"d2f257bf.d8fd58","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2870.2624740600586,"y":3629.8454303741455,"z":"acdffee6.4646","wires":[["81a978c4.55a318","1825f2cc.d9255d"]]},{"id":"81a978c4.55a318","type":"save","name":"save forwarder to A&AI","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"forwarder\" \n\tkey=\"forwarding-path.forwarding-path-id = $forwarding-path.service-paths.service-path[$sp-index].service-path-instance-id\n\t AND forwarder.sequence = $forwarding-path.service-paths.service-path[$sp-index].service[$service-index].vnfs.vnf[$vnf-index].vnf-path-sequence-id\" >\n<parameter name=\"sequence\" value=\"`$forwarding-path.service-paths.service-path[$sp-index].service[$service-index].vnfs.vnf[$vnf-index].vnf-path-sequence-id`\" />\n","comments":"","outputs":1,"x":3051.262517929077,"y":3585.750457763672,"z":"acdffee6.4646","wires":[["a8b88931.1b04b8","18196271.6ec47e"]]},{"id":"1825f2cc.d9255d","type":"save","name":"save forwarder relationship to generic-vnf","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"forwarder:relationship-list\"\n key=\"forwarding-path.forwarding-path-id = $forwarding-path.service-paths.service-path[$sp-index].service-path-instance-id\n AND forwarder.sequence = $forwarding-path.service-paths.service-path[$sp-index].service[$service-index].vnfs.vnf[$vnf-index].vnf-path-sequence-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n <parameter name=\"relationship-list.relationship[0].related-to\" value=\"generic-vnf\" />\n <parameter name=\"relationship-list.relationship[0].related-link\"\n value=\"`'/aai/v$/network/generic-vnfs/generic-vnf/'\n + $forwarding-path.service-paths.service-path[$sp-index].service[$service-index].vnfs.vnf[$vnf-index].vnf-instance-id`\" />\n","comments":"","outputs":1,"x":3105.262519836426,"y":3675.036106109619,"z":"acdffee6.4646","wires":[["9e2d3b55.8e6d18","be4a1ccd.60699"]]},{"id":"31223e46.c39562","type":"execute","name":"printContext","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/gpsx.log' />\n","comments":"","outputs":1,"x":507.0833282470703,"y":2412.0832509994507,"z":"acdffee6.4646","wires":[[]]},{"id":"173a4200.c682ae","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2772.750198364258,"y":3441.0832204818726,"z":"acdffee6.4646","wires":[["7abb5ae4.45ef84"]]},{"id":"782723e.d6f5edc","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2765.1788330078125,"y":3399.583240509033,"z":"acdffee6.4646","wires":[["7abb5ae4.45ef84"]]},{"id":"7abb5ae4.45ef84","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"Failure writing forwarding-path to AAI\" />\n","comments":"","x":2969.7636108398438,"y":3414.3350400924683,"z":"acdffee6.4646","wires":[]},{"id":"a4072ca.00fd3d","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2917.7501792907715,"y":3524.4164247512817,"z":"acdffee6.4646","wires":[["38f6157.8f1caea"]]},{"id":"c1b3e443.b892d8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2908.5120849609375,"y":3477.916492462158,"z":"acdffee6.4646","wires":[["38f6157.8f1caea"]]},{"id":"38f6157.8f1caea","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"Failure writing forwarding-path relationship to AAI\" />\n","comments":"","x":3113.096908569336,"y":3492.6682138442993,"z":"acdffee6.4646","wires":[]},{"id":"18196271.6ec47e","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3242.7502117156982,"y":3607.749852180481,"z":"acdffee6.4646","wires":[["ede6f0bd.9d33c"]]},{"id":"a8b88931.1b04b8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3235.178846359253,"y":3566.2498722076416,"z":"acdffee6.4646","wires":[["ede6f0bd.9d33c"]]},{"id":"ede6f0bd.9d33c","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"Failure writing forwarder to AAI\" />\n","comments":"","x":3438.0970458984375,"y":3581.001434326172,"z":"acdffee6.4646","wires":[]},{"id":"be4a1ccd.60699","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3347.7501678466797,"y":3699.416358947754,"z":"acdffee6.4646","wires":[["6576c8ed.7d6ce8"]]},{"id":"9e2d3b55.8e6d18","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3340.1788024902344,"y":3657.9163789749146,"z":"acdffee6.4646","wires":[["6576c8ed.7d6ce8"]]},{"id":"6576c8ed.7d6ce8","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"Failure writing forwarder relationship to AAI\" />\n","comments":"","x":3541.4303436279297,"y":3672.667942047119,"z":"acdffee6.4646","wires":[]},{"id":"ee78a452.895eb8","type":"for","name":"for each service","xml":"<for index='service-index' start='0' end='`$service-paths.service-path[$sp-index].service_length`' >\n","comments":"","outputs":1,"x":2534.416831970215,"y":3631.083258628845,"z":"acdffee6.4646","wires":[["2f92c949.4d6476"]]},{"id":"8b691431.cc9278","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2550.0833892822266,"y":3170.4164781570435,"z":"acdffee6.4646","wires":[["28ee0b7.a193cf4"]]},{"id":"2ad23b25.4eac74","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2542.5120239257812,"y":3128.916498184204,"z":"acdffee6.4646","wires":[["28ee0b7.a193cf4"]]},{"id":"28ee0b7.a193cf4","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"Failure creating service instance in AAI\" />\n","comments":"","x":2745.430223464966,"y":3143.6680603027344,"z":"acdffee6.4646","wires":[]},{"id":"97c9808b.9352c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2660.0833892822266,"y":3053.7497301101685,"z":"acdffee6.4646","wires":[["1818ef16.6dc701"]]},{"id":"1818ef16.6dc701","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"Failure creating service instance in MD-SAL\" />\n","comments":"","x":2850.0833892822266,"y":3052.0829820632935,"z":"acdffee6.4646","wires":[]},{"id":"d843bbaa.11f848","type":"set","name":"increment serv-insts_length","xml":"<set>\n<parameter name='tmp.serv-insts_length' value='`$tmp.serv-insts_length + 1`' />\n","comments":"","x":3523.7498168945312,"y":2057.916774749756,"z":"acdffee6.4646","wires":[]},{"id":"532dd116.0d3c4","type":"for","name":"for each service-path","xml":"<for index='sp-index' start='0' end='`$service-paths.service-path_length`' >\n","comments":"","outputs":1,"x":1718.4169311523438,"y":3522.0831785202026,"z":"acdffee6.4646","wires":[["6026a1f0.02df4"]]},{"id":"bab97280.4fcff","type":"switchNode","name":"switch vnf_length","xml":"<switch test='`$serv-inst.vnf-list_length`'>\n","comments":"","outputs":1,"x":2978.809280395508,"y":2006.4284648895264,"z":"acdffee6.4646","wires":[["83930c1.6232af","415745e9.86f9ec","a96c0af7.4076f8","7fb684c8.1e8ddc"]]},{"id":"83930c1.6232af","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":3181.6666107177734,"y":1924.9999256134033,"z":"acdffee6.4646","wires":[["495a7820.28bb28"]]},{"id":"415745e9.86f9ec","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":3182.9166107177734,"y":1963.7499256134033,"z":"acdffee6.4646","wires":[["495a7820.28bb28"]]},{"id":"495a7820.28bb28","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='data-error' value=\"`'Service instance ' + $si.service-instance-id + ' has no VNFs, skipping'`\" />\n","comments":"","x":3380.4165573120117,"y":1942.4998750686646,"z":"acdffee6.4646","wires":[]},{"id":"a96c0af7.4076f8","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":3181.666549682617,"y":2032.4999074935913,"z":"acdffee6.4646","wires":[["bff428c8.cc6008"]]},{"id":"bff428c8.cc6008","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":3331.6665229797363,"y":2032.249888420105,"z":"acdffee6.4646","wires":[["2de86e6.3962e92","d843bbaa.11f848"]]},{"id":"7fb684c8.1e8ddc","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3184.166717529297,"y":2166.6664543151855,"z":"acdffee6.4646","wires":[["93bc2b5.8b736d8"]]},{"id":"93bc2b5.8b736d8","type":"get-resource","name":"get-resource SERVICE_INSTANCE_TO_COMPOSITE_INSTANCE_MAPPING","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n key='SELECT forwarding_path_service_instance_id from SERVICE_INSTANCE_TO_COMPOSITE_INSTANCE_MAPPING WHERE simple_service_instance_id = $serv-inst.service-instance-id'\n pfx='db.mapped-service-instance-id'>\n\n","comments":"","outputs":1,"x":3556.5481567382812,"y":2165.952667236328,"z":"acdffee6.4646","wires":[["30b771e0.9efa2e","ac42250b.451688","9c7d869c.656378"]]},{"id":"30b771e0.9efa2e","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3923.1668853759766,"y":2097.642951965332,"z":"acdffee6.4646","wires":[["3cc43602.d355aa"]]},{"id":"ac42250b.451688","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3931.7383155822754,"y":2141.928665161133,"z":"acdffee6.4646","wires":[["c6af0644.d6e838"]]},{"id":"3cc43602.d355aa","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='data-error' value=\"System error reading SERVICE_INSTANCE_TO_COMPOSITE_INSTANCE_MAPPING table\" />\n","comments":"","x":4140.000244140625,"y":2095.8333253860474,"z":"acdffee6.4646","wires":[]},{"id":"c6af0644.d6e838","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='data-error' value=\"`'No entry in SERVICE_INSTANCE_TO_COMPOSITE_INSTANCE_MAPPING table for service instance ' + $serv-inst.service-instance-id`\" />\n","comments":"","x":4140.000076293945,"y":2142.166621208191,"z":"acdffee6.4646","wires":[]},{"id":"9c7d869c.656378","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3928.333480834961,"y":2237.500123023987,"z":"acdffee6.4646","wires":[["47635cab.dcb404"]]},{"id":"47635cab.dcb404","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":4064.9997482299805,"y":2235.8332090377808,"z":"acdffee6.4646","wires":[["3ffa27b1.735848","cbac044e.797f28"]]},{"id":"3ffa27b1.735848","type":"execute","name":"generate port-mirror-configuration url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.service`\"/>\n <parameter name=\"outputPath\" value=\"tmp.service-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$db.mapped-service-instance-id.forwarding-path-service-instance-id`\"/>\n","comments":"","outputs":1,"x":4285.00008392334,"y":2194.166865348816,"z":"acdffee6.4646","wires":[[]]},{"id":"cbac044e.797f28","type":"execute","name":"execute RestApiCallNode - get service","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.service-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-service\" />\n\n","comments":"","outputs":1,"x":4288.332931518555,"y":2280.8332109451294,"z":"acdffee6.4646","wires":[["8ee34d45.6e794","f93605ea.7e7b88"]]},{"id":"f93605ea.7e7b88","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":4516.666107177734,"y":2342.499878883362,"z":"acdffee6.4646","wires":[["a4725830.66d628"]]},{"id":"8ee34d45.6e794","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":4516.442153930664,"y":2235.3466358184814,"z":"acdffee6.4646","wires":[["dd9a7f75.ee19c"]]},{"id":"dd9a7f75.ee19c","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='data-error' value=\"`'Cannot find service instance ' + $db.mapped-service-instance-id.forwarding-path-service-instance-id + ' in MD-SAL'`\" />\n","comments":"","x":4710.000076293945,"y":2234.166537284851,"z":"acdffee6.4646","wires":[]},{"id":"a4725830.66d628","type":"switchNode","name":"switch forwarding-path_length","xml":"<switch test='`$mdsal-service.service[0].service-data.forwarding-paths.forwarding-path_length`'>\n","comments":"","outputs":1,"x":4720.000076293945,"y":2342.500033378601,"z":"acdffee6.4646","wires":[["f4cd3b16.9f1b48","e02ba6d7.e68a68","f2da480c.9764c8"]]},{"id":"f4cd3b16.9f1b48","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":4932.000106811523,"y":2278.7500410079956,"z":"acdffee6.4646","wires":[["7f12cf21.a3af1"]]},{"id":"e02ba6d7.e68a68","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":4933.250106811523,"y":2317.5000410079956,"z":"acdffee6.4646","wires":[["7f12cf21.a3af1"]]},{"id":"f2da480c.9764c8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":4930.393089294434,"y":2412.1429262161255,"z":"acdffee6.4646","wires":[["966b6bde.cc8f88"]]},{"id":"7f12cf21.a3af1","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='data-error' value=\"`'Service instance ' + $db.mapped-service-instance-id.forwarding-path-service-instance-id + ' has multiple VNFs but no forwarding paths were found'`\" />\n","comments":"","x":5120.750106811523,"y":2296.2500410079956,"z":"acdffee6.4646","wires":[]},{"id":"966b6bde.cc8f88","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":5059.143089294434,"y":2412.1429262161255,"z":"acdffee6.4646","wires":[["73c62547.358c5c","2c341601.f78f1a","18d9283c.3cd808"]]},{"id":"73c62547.358c5c","type":"set","name":"copy forwarding-paths to serv-insts array","xml":"<set>\n<parameter name='serv-cust[$serv-index].serv-insts[$tmp.serv-insts_length].forwarding-paths.'\n value='`$mdsal-service.service[0].service-data.forwarding-paths.`' />\n","comments":"","x":5296.666580200195,"y":2412.500033378601,"z":"acdffee6.4646","wires":[]},{"id":"2c341601.f78f1a","type":"set","name":"copy serv-inst to serv-insts array","xml":"<set>\n<parameter name='serv-cust[$serv-index].serv-insts[$tmp.serv-insts_length].' value='`$serv-inst.`' />\n","comments":"","x":5272,"y":2366,"z":"acdffee6.4646","wires":[]},{"id":"18d9283c.3cd808","type":"set","name":"increment serv-insts_length","xml":"<set>\n<parameter name='tmp.serv-insts_length' value='`$tmp.serv-insts_length + 1`' />\n","comments":"","x":5254.6904296875,"y":2459.416748046875,"z":"acdffee6.4646","wires":[]},{"id":"ab273d26.ee67d","type":"switchNode","name":"switch service_length == serv-cust_length","xml":"<switch test='`$service-paths.service-path[$sp-index].service_length == $serv-cust_length`'>\n","comments":"","outputs":1,"x":1463.3333282470703,"y":2587.6667375564575,"z":"acdffee6.4646","wires":[["57af92ff.0a268c"]]},{"id":"432943b9.13704c","type":"for","name":"for each service-path","xml":"<for index='sp-index' start='0' end='`$service-paths.service-path_length`' >\n","comments":"","outputs":1,"x":1183.3333282470703,"y":2588.6667375564575,"z":"acdffee6.4646","wires":[["ab273d26.ee67d"]]},{"id":"db0b5e4d.138fb","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1001.3333282470703,"y":2710.6667375564575,"z":"acdffee6.4646","wires":[["b67f5438.96b3a8","432943b9.13704c","ed2004a7.484e98"]]},{"id":"b67f5438.96b3a8","type":"set","name":"set found-service-path to false","xml":"<set>\n<parameter name='found-service-path' value='false' />\n","comments":"","x":1211.3333282470703,"y":2542.6667375564575,"z":"acdffee6.4646","wires":[]},{"id":"57af92ff.0a268c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1697.3333282470703,"y":2586.6667375564575,"z":"acdffee6.4646","wires":[["14f78ce9.5e1413"]]},{"id":"14f78ce9.5e1413","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1823.3333282470703,"y":2586.6667375564575,"z":"acdffee6.4646","wires":[["51e6f6dd.41b898","8e5d432a.80844"]]},{"id":"51e6f6dd.41b898","type":"set","name":"set found-service-path to true","xml":"<set>\n<parameter name='found-service-path' value='true' />\n","comments":"","x":2017.3333282470703,"y":2558.6667375564575,"z":"acdffee6.4646","wires":[]},{"id":"8e5d432a.80844","type":"break","name":"break","xml":"<break>\n","comments":"","x":1947.3333282470703,"y":2606.6667375564575,"z":"acdffee6.4646","wires":[]},{"id":"ed2004a7.484e98","type":"switchNode","name":"switch found-service-path","xml":"<switch test='`$found-service-path`'>\n","comments":"","outputs":1,"x":1197.3333282470703,"y":2922.6667375564575,"z":"acdffee6.4646","wires":[["902c3da4.38f8e","cc4f97d7.be3168"]]},{"id":"cc4f97d7.be3168","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1401.3333282470703,"y":3156.6667375564575,"z":"acdffee6.4646","wires":[["654073a0.8dc7dc"]]},{"id":"902c3da4.38f8e","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1383.3333282470703,"y":2702.6667375564575,"z":"acdffee6.4646","wires":[["95ceba9c.126508"]]},{"id":"95ceba9c.126508","type":"set","name":"set error (for logging only)","xml":"<set>\n<parameter name='error-message' value=\"`'No service paths found for path name '\n + $db.path-segment[0].path-name`\" />\n","comments":"","x":1573.3333282470703,"y":2702.6667375564575,"z":"acdffee6.4646","wires":[]},{"id":"6026a1f0.02df4","type":"switchNode","name":"switch service_length == serv-cust_length","xml":"<switch test='`$service-paths.service-path[$sp-index].service_length == $serv-cust_length`'>\n","comments":"","outputs":1,"x":2000,"y":3522,"z":"acdffee6.4646","wires":[["ce386471.0c3478"]]},{"id":"ce386471.0c3478","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2234,"y":3521,"z":"acdffee6.4646","wires":[["c64714d6.1fcac8"]]},{"id":"c64714d6.1fcac8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2360,"y":3521,"z":"acdffee6.4646","wires":[["ec6851e3.24d41","f9f23fe5.c832e","ee78a452.895eb8"]]}] \ No newline at end of file
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 25dde48d..2eac997a 100644
--- 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":"f07e5af5.2a81a8","type":"dgstart","name":"DGSTART","outputs":1,"x":100,"y":80.74699592590332,"z":"4e44f4dc.d3fbac","wires":[["7dfb89c0.30c288"]]},{"id":"7dfb89c0.30c288","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":215.28570556640625,"y":122.65177536010742,"z":"4e44f4dc.d3fbac","wires":[["1bd914ea.94267b"]]},{"id":"1bd914ea.94267b","type":"method","name":"method vnf-topology-operation-assign","xml":"<method rpc='vnf-topology-operation-assign' mode='sync'>\n","comments":"","outputs":1,"x":188.09530639648438,"y":165.41365909576416,"z":"4e44f4dc.d3fbac","wires":[["11bf25d2.bdb8da"]]},{"id":"2e619ce7.bf2e34","type":"comment","name":"vnf-topology-operation-assign","info":"","comments":"","x":476.0115280151367,"y":30,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"b32ac93e.aaa508","type":"switchNode","name":"switch request-action","xml":"<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":486.3809509277344,"y":313.8898277282715,"z":"4e44f4dc.d3fbac","wires":[["95fe5c1b.234a3","1c086997.eb74d6"]]},{"id":"95fe5c1b.234a3","type":"outcome","name":"CreateVnfInstance","xml":"<outcome value='CreateVnfInstance'>\n","comments":"","outputs":1,"x":740.0952453613281,"y":291.0327091217041,"z":"4e44f4dc.d3fbac","wires":[["b3d6c559.f5a1f8"]]},{"id":"1c086997.eb74d6","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":702.0952110290527,"y":336.7470369338989,"z":"4e44f4dc.d3fbac","wires":[["3d3a9ebb.853872"]]},{"id":"b3d6c559.f5a1f8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":924.9523735046387,"y":291.0327386856079,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"3d3a9ebb.853872","type":"returnFailure","name":"return failure","xml":"<return 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":942.0952186584473,"y":336.746994972229,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"ae713fba.3df7f","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":186.07147216796875,"y":1577.7707920074463,"z":"4e44f4dc.d3fbac","wires":[["78a8ab8d.e4a224","766c94ea.b9611c","434cb265.75e27c","a6c6204f.95895","b69f4291.61fa5","f416891b.c49b38","b1c5abc7.29b208","c969fd25.a5dbc","5551cb18.77a4d4","27e79a76.199b26","68282397.14338c","4cef2e4e.2eeb7","b4645e2b.83793","19423cf4.442143","59cc3158.776f9","2eaa370.dfe9cca","ab5ed0d2.dee8c","2dd176ed.0041ba","acbd5170.3e4c4","60684400.780c7c","31bebad4.8a5896","438000d4.31b1e","6f6caf00.d957c","277ce9ee.277656","56e0bd4b.bd3f64","58f81e72.df87b","719fd6d4.9a4d78","1fd770ea.bfd8af","183d18f7.8083e7","537d84c0.249e5c","4cc45d68.737674","ed7dcd3d.7a64c","d4e45ae3.95e8e8","569d159b.7974ac"]]},{"id":"3e444c8d.9a16f4","type":"get-resource","name":"get-resource VF_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.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":498.7142562866211,"y":405.0326976776123,"z":"4e44f4dc.d3fbac","wires":[["474b191f.eb1888","e8e33d1a.e987"]]},{"id":"f4e1f5bf.f95318","type":"returnFailure","name":"return failure","xml":"<return 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":940.1427345275879,"y":428.46118354797363,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"474b191f.eb1888","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":699.4999542236328,"y":385.413535118103,"z":"4e44f4dc.d3fbac","wires":[["bd82a433.1ab928"]]},{"id":"e8e33d1a.e987","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":708.0713844299316,"y":429.6992483139038,"z":"4e44f4dc.d3fbac","wires":[["f4e1f5bf.f95318"]]},{"id":"bd82a433.1ab928","type":"returnFailure","name":"return failure","xml":"<return 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":939.4999351501465,"y":383.5564422607422,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"78a8ab8d.e4a224","type":"switchNode","name":"switch service-data.vnfs.vnf_length","xml":"<switch test='`$service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":532.3809204101562,"y":1155.9851322174072,"z":"4e44f4dc.d3fbac","wires":[["120eef5e.ea3881","a22c3ff8.e2fb3"]]},{"id":"120eef5e.ea3881","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":758.0952491760254,"y":1123.1279201507568,"z":"4e44f4dc.d3fbac","wires":[["b7dbc5c1.1c67c8"]]},{"id":"b7dbc5c1.1c67c8","type":"set","name":"set vnf-index=0","xml":"<set>\n<parameter name='vnf-index' value='0' />\n","comments":"","x":922.3809700012207,"y":1122.1279983520508,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"a22c3ff8.e2fb3","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":759.523811340332,"y":1187.4137382507324,"z":"4e44f4dc.d3fbac","wires":[["41b7f789.ac4538"]]},{"id":"93cbad48.90b08","type":"set","name":"set vnf-index = vnf_length","xml":"<set>\n<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />\n","comments":"","x":1098.3809661865234,"y":1165.699426651001,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"a06ff958.ca8818","type":"for","name":"for each existing VNF","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":1083.8094787597656,"y":1211.6993656158447,"z":"4e44f4dc.d3fbac","wires":[["8b898020.e1666"]]},{"id":"41b7f789.ac4538","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":895.2380714416504,"y":1187.413703918457,"z":"4e44f4dc.d3fbac","wires":[["93cbad48.90b08","a06ff958.ca8818"]]},{"id":"8b898020.e1666","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":1438.0952453613281,"y":1211.270845413208,"z":"4e44f4dc.d3fbac","wires":[["b372ccf2.90f5f"]]},{"id":"b372ccf2.90f5f","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1732.3810005187988,"y":1210.8423299789429,"z":"4e44f4dc.d3fbac","wires":[["2889470.ea41bba"]]},{"id":"2889470.ea41bba","type":"returnFailure","name":"return failure","xml":"<return 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'`\" />\n","comments":"","x":1880.9523620605469,"y":1210.8422775268555,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"11adb872.3cc0d8","type":"comment","name":"make sure this VNF doesn't exist already","info":"","comments":"","x":1425.2379760742188,"y":1168.8422756195068,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"766c94ea.b9611c","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":498.0952033996582,"y":1687.6518993377686,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"434cb265.75e27c","type":"switchNode","name":"switch input vnf-name","xml":"<switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-name`'>\n","comments":"","outputs":1,"x":510.59522247314453,"y":2049.770956993103,"z":"4e44f4dc.d3fbac","wires":[["e8e240a8.b6802","9b1fc0be.8fa7"]]},{"id":"a6c6204f.95895","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 = $prop.cloud-region.cloud-owner AND \n\t\t cloud-region.cloud-region-id = $vnf-topology-operation-input.vnf-request-input.aic-cloud-region AND\n\t\t depth='all'\"\n pfx='aai.cloud-region' local-only='false' >\n\n","comments":"","outputs":1,"x":542.738166809082,"y":2945.7706928253174,"z":"4e44f4dc.d3fbac","wires":[["8e720469.5e8cb8","7b05d3d.76e1b2c"]]},{"id":"7b05d3d.76e1b2c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":767.9843597412109,"y":2963.921548843384,"z":"4e44f4dc.d3fbac","wires":[["a42ab710.cce278"]]},{"id":"4676d832.85c178","type":"returnFailure","name":"return failure","xml":"<return 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":1069.6510314941406,"y":2963.9215660095215,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"8e720469.5e8cb8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":776.912956237793,"y":2922.207282066345,"z":"4e44f4dc.d3fbac","wires":[["e0c152ab.e7e04"]]},{"id":"f16260c8.4591b","type":"returnFailure","name":"return failure","xml":"<return 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":1069.9289321899414,"y":2921.512840270996,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"b69f4291.61fa5","type":"get-resource","name":"get-resource VF_TO_NETWORK_ROLE_MAPPING","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.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":607.9762496948242,"y":3256.8182125091553,"z":"4e44f4dc.d3fbac","wires":[["60a87727.b01328","35785ae2.8b74a6"]]},{"id":"60a87727.b01328","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":903.7619209289551,"y":3235.532377243042,"z":"4e44f4dc.d3fbac","wires":[["7f628377.de20fc"]]},{"id":"35785ae2.8b74a6","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":912.3333511352539,"y":3279.818090438843,"z":"4e44f4dc.d3fbac","wires":[["cb783055.50a9a"]]},{"id":"7fcd46cd.478d88","type":"returnFailure","name":"return failure","xml":"<return 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":1220.428544998169,"y":3235.342109680176,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"7b16dda0.235334","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":716.2383193969727,"y":3728.127547264099,"z":"4e44f4dc.d3fbac","wires":[["9c162cfb.04057","32d1bfdb.27738","7cbe8d03.77d1c4","9ecaa4ff.23c328","4bcf8a69.ae8c44","8025807.9d68d8","ccd49d85.073d1","cdefc051.a04bf"]]},{"id":"7cbe8d03.77d1c4","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":949.0953369140625,"y":3407.413411140442,"z":"4e44f4dc.d3fbac","wires":[["9891f515.8ee1c8","94d72e9b.4db64"]]},{"id":"94d72e9b.4db64","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1153.143051147461,"y":3429.5562505722046,"z":"4e44f4dc.d3fbac","wires":[["22276dbf.92cb12"]]},{"id":"91d086d5.905598","type":"returnFailure","name":"return failure","xml":"<return 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":1468.143081665039,"y":3429.889594078064,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"9891f515.8ee1c8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1162.071647644043,"y":3387.841983795166,"z":"4e44f4dc.d3fbac","wires":[["85a5708b.39733"]]},{"id":"b5a9325f.8e06e","type":"returnFailure","name":"return failure","xml":"<return 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":1466.754277229309,"y":3388.8141202926636,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"9c162cfb.04057","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":938.2859268188477,"y":3894.4136543273926,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"5551cb18.77a4d4","type":"for","name":"for each cloud-region availability zone","xml":"<for index='idx' start='0' end='`$aai.cloud-region.availability-zones.availability-zone_length`' >\n","comments":"","outputs":1,"x":535.0002975463867,"y":4286.5324420928955,"z":"4e44f4dc.d3fbac","wires":[["858bb9df.ef0b98"]]},{"id":"420bf10a.3f71f","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.cloud-region.availability-zones.availability-zone[$idx].availability-zone-name`' />\n","comments":"","x":996.6669807434082,"y":4255.865856170654,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"27e79a76.199b26","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":494.61922454833984,"y":4136.484802246094,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"cbb1f011.821ee","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":961.1907577514648,"y":4430.294654846191,"z":"4e44f4dc.d3fbac","wires":[["32a6aa28.4d7b46","22485f0b.22ad6"]]},{"id":"b4645e2b.83793","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":454.42877197265625,"y":4895.913044929504,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"4cef2e4e.2eeb7","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":544.2422180175781,"y":4798.250525474548,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"b1c5abc7.29b208","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":499.5716247558594,"y":3728.1277503967285,"z":"4e44f4dc.d3fbac","wires":[["7b16dda0.235334"]]},{"id":"f416891b.c49b38","type":"set","name":"set network-index = 0","xml":"<set>\n<parameter name='network-index' value='0' />\n","comments":"","x":510.40474700927734,"y":3310.8660068511963,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"32d1bfdb.27738","type":"set","name":"increment network-index","xml":"<set>\n<parameter name='network-index' value='`$network-index + 1`' />\n","comments":"","x":948.6192855834961,"y":4049.175630569458,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"c969fd25.a5dbc","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":493.47631072998047,"y":4086.4848461151123,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"68282397.14338c","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":459.76204681396484,"y":4745.913356781006,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"19423cf4.442143","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":484.19066619873047,"y":4429.294570922852,"z":"4e44f4dc.d3fbac","wires":[["5f481128.d6fd6"]]},{"id":"5f481128.d6fd6","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":687.857307434082,"y":4429.294531822205,"z":"4e44f4dc.d3fbac","wires":[["cbb1f011.821ee"]]},{"id":"59cc3158.776f9","type":"set","name":"set new vnf_length","xml":"<set>\n<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />\n","comments":"","x":481.02384185791016,"y":1208.0090227127075,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"2eaa370.dfe9cca","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":555.5952911376953,"y":3033.008864402771,"z":"4e44f4dc.d3fbac","wires":[["e5925a76.815c58"]]},{"id":"e5925a76.815c58","type":"switchNode","name":"switch related-to","xml":"<switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>\n","comments":"","outputs":1,"x":803.2738342285156,"y":3032.7587938308716,"z":"4e44f4dc.d3fbac","wires":[["3699dec9.348a82"]]},{"id":"3699dec9.348a82","type":"outcome","name":"complex","xml":"<outcome value='complex'>\n","comments":"","outputs":1,"x":972.7381553649902,"y":3032.1516160964966,"z":"4e44f4dc.d3fbac","wires":[["ed1ad94c.99ecb8"]]},{"id":"98e2f8af.a2f578","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":1293.4524536132812,"y":3031.8182735443115,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"ab5ed0d2.dee8c","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":488.64291763305664,"y":3146.1039962768555,"z":"4e44f4dc.d3fbac","wires":[["cd42ad7f.c7287"]]},{"id":"cd42ad7f.c7287","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":636.7857513427734,"y":3146.103979110718,"z":"4e44f4dc.d3fbac","wires":[["b6ad7e13.cbdb8"]]},{"id":"f7a16dbf.78dcf","type":"returnFailure","name":"return failure","xml":"<return 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":927.2619438171387,"y":3147.3420248031616,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"817e056c.b110d8","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.0954627990723,"y":2504.9612531661987,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"4527349c.9a52ec","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":1058.5479049682617,"y":3718.9850330352783,"z":"4e44f4dc.d3fbac","wires":[["45b722b6.db776c"]]},{"id":"2b805935.a35cb6","type":"switchNode","name":"switch orchestration-status","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].orchestration-status`'>\n","comments":"","outputs":1,"x":1477.1190757751465,"y":3653.5564975738525,"z":"4e44f4dc.d3fbac","wires":[["b291cd89.5e04","688efdb4.26b7f4","1dbdf0e3.6d4c4f","3bfc9f47.c3df5","8f5abb8c.6c74f8"]]},{"id":"b291cd89.5e04","type":"outcome","name":"Pending Delete","xml":"<outcome value='Pending Delete'>\n","comments":"","outputs":1,"x":1717.785945892334,"y":3695.2230014801025,"z":"4e44f4dc.d3fbac","wires":[["757bdd4d.6abe74"]]},{"id":"688efdb4.26b7f4","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1690.6430854797363,"y":3746.222982406616,"z":"4e44f4dc.d3fbac","wires":[["47f9fe3b.cd325"]]},{"id":"9833efbf.69304","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":2226.3575325012207,"y":3714.794277191162,"z":"4e44f4dc.d3fbac","wires":[["440449fc.68ede8"]]},{"id":"47f9fe3b.cd325","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":1860.6429977416992,"y":3745.7943592071533,"z":"4e44f4dc.d3fbac","wires":[["46c88819.e15b38"]]},{"id":"440449fc.68ede8","type":"outcome","name":"cloud-region","xml":"<outcome value='cloud-region'>\n","comments":"","outputs":1,"x":2400.6431732177734,"y":3714.3657236099243,"z":"4e44f4dc.d3fbac","wires":[["3d11cc80.c4e0c4"]]},{"id":"3d11cc80.c4e0c4","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":2597.785873413086,"y":3714.7941913604736,"z":"4e44f4dc.d3fbac","wires":[["ced7a748.131728"]]},{"id":"ced7a748.131728","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":2829.2144737243652,"y":3714.365566253662,"z":"4e44f4dc.d3fbac","wires":[["92fbe3e9.e193d"]]},{"id":"92fbe3e9.e193d","type":"outcome","name":"cloud-region.cloud-region-id","xml":"<outcome value='cloud-region.cloud-region-id'>\n","comments":"","outputs":1,"x":3070.643039703369,"y":3714.365662574768,"z":"4e44f4dc.d3fbac","wires":[["3d76bce7.883fc4"]]},{"id":"3d76bce7.883fc4","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":3374.9289588928223,"y":3714.2227182388306,"z":"4e44f4dc.d3fbac","wires":[["5f95e58e.702e5c"]]},{"id":"5f95e58e.702e5c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3079.929096221924,"y":3831.8656721115112,"z":"4e44f4dc.d3fbac","wires":[["a7f11203.5d359"]]},{"id":"9ecaa4ff.23c328","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":894.762077331543,"y":3650.2706775665283,"z":"4e44f4dc.d3fbac","wires":[["4527349c.9a52ec","be0cee42.5ab7e"]]},{"id":"4bcf8a69.ae8c44","type":"set","name":"set l3-network-id = -1","xml":"<set>\n<parameter name='l3-network-id' value='-1' />\n","comments":"","x":939.0954360961914,"y":3522.1753311157227,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"a7f11203.5d359","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3225.7620735168457,"y":3831.3417806625366,"z":"4e44f4dc.d3fbac","wires":[["afc40b2f.c29e28","6f9b0a93.f694a4","2a1ad752.bfcd38"]]},{"id":"afc40b2f.c29e28","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":3461.0000762939453,"y":3793.4847497940063,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"8025807.9d68d8","type":"switchNode","name":"switch l3-network-id","xml":"<switch test='`$l3-network-id`'>\n","comments":"","outputs":1,"x":936.0953598022461,"y":3845.842372894287,"z":"4e44f4dc.d3fbac","wires":[["aa114731.395c08"]]},{"id":"aa114731.395c08","type":"outcome","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":1106.0953102111816,"y":3845.842128753662,"z":"4e44f4dc.d3fbac","wires":[["2fba815e.79c32e"]]},{"id":"6395a483.342b9c","type":"returnFailure","name":"return failure","xml":"<return 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":1389.4286727905273,"y":3845.8423776626587,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"2dd176ed.0041ba","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":558.9525375366211,"y":2527.7856969833374,"z":"4e44f4dc.d3fbac","wires":[["d5c66a20.2113f8","4eb518d2.0c93e8"]]},{"id":"d5c66a20.2113f8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":764.6192092895508,"y":2504.9286603927612,"z":"4e44f4dc.d3fbac","wires":[["817e056c.b110d8"]]},{"id":"4eb518d2.0c93e8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":766.0478057861328,"y":2549.2142515182495,"z":"4e44f4dc.d3fbac","wires":[["7ce719fb.9a6228"]]},{"id":"7ce719fb.9a6228","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":920.3335418701172,"y":2548.6428236961365,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"ef5faa7d.94cb58","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.0477333068848,"y":2593.4999294281006,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"acbd5170.3e4c4","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":531.5715560913086,"y":2616.3244342803955,"z":"4e44f4dc.d3fbac","wires":[["ce65d89f.20afc8","34fc501b.a39a8"]]},{"id":"ce65d89f.20afc8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":765.5715293884277,"y":2593.467366218567,"z":"4e44f4dc.d3fbac","wires":[["ef5faa7d.94cb58"]]},{"id":"34fc501b.a39a8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":767.0001258850098,"y":2637.752957344055,"z":"4e44f4dc.d3fbac","wires":[["f5981394.788ef"]]},{"id":"f5981394.788ef","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":921.2858619689941,"y":2637.181529521942,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"538946a2.181668","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":913.1906661987305,"y":2682.3571367263794,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"60684400.780c7c","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":539.714427947998,"y":2705.1815814971924,"z":"4e44f4dc.d3fbac","wires":[["e137a9dc.787888","5fc591ca.bc88b"]]},{"id":"e137a9dc.787888","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":762.714412689209,"y":2682.324543952942,"z":"4e44f4dc.d3fbac","wires":[["538946a2.181668"]]},{"id":"5fc591ca.bc88b","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":764.143009185791,"y":2726.61013507843,"z":"4e44f4dc.d3fbac","wires":[["b9a36199.dc978"]]},{"id":"b9a36199.dc978","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":918.4287452697754,"y":2726.038707256317,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"855b2ca8.132f9","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":913.1906661987305,"y":2769.4999589920044,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"31bebad4.8a5896","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":534.714427947998,"y":2792.3244037628174,"z":"4e44f4dc.d3fbac","wires":[["7a7f7561.1b9f2c","af9f8b2b.cd7db8"]]},{"id":"7a7f7561.1b9f2c","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":762.714412689209,"y":2769.467366218567,"z":"4e44f4dc.d3fbac","wires":[["855b2ca8.132f9"]]},{"id":"af9f8b2b.cd7db8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":764.143009185791,"y":2813.752957344055,"z":"4e44f4dc.d3fbac","wires":[["f010777f.4fc4a8"]]},{"id":"f010777f.4fc4a8","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":918.4287452697754,"y":2813.181529521942,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"757bdd4d.6abe74","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1871.0000381469727,"y":3695.999878883362,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"8f5abb8c.6c74f8","type":"outcome","name":"PendingDelete","xml":"<outcome value='PendingDelete'>\n","comments":"","outputs":1,"x":1715.6666793823242,"y":3650.9997930526733,"z":"4e44f4dc.d3fbac","wires":[["689950a3.df60a"]]},{"id":"689950a3.df60a","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1870.880771636963,"y":3651.7766704559326,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"3bfc9f47.c3df5","type":"outcome","name":"Pending Create","xml":"<outcome value='Pending Create'>\n","comments":"","outputs":1,"x":1717.6666793823242,"y":3607.6662969589233,"z":"4e44f4dc.d3fbac","wires":[["ea88d2ba.493d6"]]},{"id":"ea88d2ba.493d6","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1870.880771636963,"y":3608.4431743621826,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"1dbdf0e3.6d4c4f","type":"outcome","name":"PendingCreate","xml":"<outcome value='PendingCreate'>\n","comments":"","outputs":1,"x":1717.6666793823242,"y":3564.3330450057983,"z":"4e44f4dc.d3fbac","wires":[["8104066e.259008"]]},{"id":"8104066e.259008","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1870.880771636963,"y":3565.1099224090576,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"fe91b2bf.8c099","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":1404.047706604004,"y":3985.0472140312195,"z":"4e44f4dc.d3fbac","wires":[["b10f2375.b9afa"]]},{"id":"53c17453.f0880c","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":1392.7142715454102,"y":4030.0472960472107,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"438000d4.31b1e","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.cloud-region.availability-zones.availability-zone_length`' />\n","comments":"","x":554.6668014526367,"y":4374.547909736633,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"6f6caf00.d957c","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":495.8333511352539,"y":2461.8334608078003,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"277ce9ee.277656","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":475.0000686645508,"y":4584.213672637939,"z":"4e44f4dc.d3fbac","wires":[["7a3c612.03fada","d92cf5a6.33b858"]]},{"id":"56e0bd4b.bd3f64","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":475.00010681152344,"y":4514.214155197144,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"58f81e72.df87b","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.1666946411133,"y":2413.5000038146973,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"719fd6d4.9a4d78","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":449.33349990844727,"y":4844.690294265747,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"9263c515.503118","type":"returnFailure","name":"return failure","xml":"<return 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":1511.6669120788574,"y":4450.880569458008,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"32a6aa28.4d7b46","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1211.024112701416,"y":4407.833230018616,"z":"4e44f4dc.d3fbac","wires":[["672f3870.869518"]]},{"id":"22485f0b.22ad6","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1219.5955429077148,"y":4452.1189432144165,"z":"4e44f4dc.d3fbac","wires":[["6e62ccc6.dc7f34"]]},{"id":"32930b6a.86e284","type":"returnFailure","name":"return failure","xml":"<return 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":1514.3575057983398,"y":4407.642774581909,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"3c4d390f.0ff276","type":"returnFailure","name":"return failure","xml":"<return 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":946.6668472290039,"y":4604.214105606079,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"7a3c612.03fada","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":649.3573989868164,"y":4562.833268165588,"z":"4e44f4dc.d3fbac","wires":[["db6c1834.e91948"]]},{"id":"d92cf5a6.33b858","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":657.9288291931152,"y":4607.118981361389,"z":"4e44f4dc.d3fbac","wires":[["ec9973e.c6a799"]]},{"id":"7baf675.e9c2498","type":"returnFailure","name":"return failure","xml":"<return 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":949.3574409484863,"y":4560.9763107299805,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"1fd770ea.bfd8af","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":547.5000152587891,"y":2865.1666078567505,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"703de5d6.b6b11c","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":1312.8333129882812,"y":2986.5801916122437,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"ed1ad94c.99ecb8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1132.500015258789,"y":3033.24697971344,"z":"4e44f4dc.d3fbac","wires":[["703de5d6.b6b11c","98e2f8af.a2f578","62cd4dc6.bccf24"]]},{"id":"62cd4dc6.bccf24","type":"break","name":"break","xml":"<break>\n","comments":"","x":1282.4999771118164,"y":3076.580276489258,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"858bb9df.ef0b98","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":786.6667404174805,"y":4285.628026008606,"z":"4e44f4dc.d3fbac","wires":[["420bf10a.3f71f","e9021688.b099b8"]]},{"id":"e9021688.b099b8","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=\"`$prop.cloud-region.cloud-owner`\" />\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.cloud-region.availability-zones.availability-zone[$idx].availability-zone-name`\" />\n","comments":"","outputs":1,"x":1080.000129699707,"y":4308.961480140686,"z":"4e44f4dc.d3fbac","wires":[["3a86920a.c74fce","85b44524.f59068"]]},{"id":"2639188b.f42278","type":"returnFailure","name":"return failure","xml":"<return 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":1637.1427917480469,"y":4332.880808830261,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"3a86920a.c74fce","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1344.833381652832,"y":4289.833302497864,"z":"4e44f4dc.d3fbac","wires":[["c2464793.9ffc08"]]},{"id":"85b44524.f59068","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1353.4048118591309,"y":4334.119015693665,"z":"4e44f4dc.d3fbac","wires":[["9d10abef.aa9d68"]]},{"id":"2754abb3.b85874","type":"returnFailure","name":"return failure","xml":"<return 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":1639.8333854675293,"y":4289.643013954163,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"cb783055.50a9a","type":"set","name":"set mapping rows to 0","xml":"<set>\n<parameter name='db.vf-network-role-mapping_length' value='0' />\n","comments":"","x":1106.3094863891602,"y":3279.437578201294,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"183d18f7.8083e7","type":"switchNode","name":"switch AAI availability-zone_length","xml":"<switch test='`$aai.cloud-region.availability-zones.availability-zone_length`'>\n","comments":"","outputs":1,"x":527.3810272216797,"y":4189.437612533569,"z":"4e44f4dc.d3fbac","wires":[["bd16fb24.0fe038"]]},{"id":"bd16fb24.0fe038","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":745.9524459838867,"y":4189.009021759033,"z":"4e44f4dc.d3fbac","wires":[["44f8e0c6.bf172"]]},{"id":"a4deaa00.e82908","type":"set","name":"set availability-zone_length to 0","xml":"<set>\n<parameter name='aai.cloud-region.availability-zones.availability-zone_length' value='0' />\n","comments":"","x":1347.381088256836,"y":4207.58025932312,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"44f8e0c6.bf172","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":934.5239181518555,"y":4189.437333583832,"z":"4e44f4dc.d3fbac","wires":[["d06ce29c.e7c56","91254f4.8fe1bb"]]},{"id":"d06ce29c.e7c56","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1137.381025314331,"y":4163.723083496094,"z":"4e44f4dc.d3fbac","wires":[["2bf16ac7.c29516"]]},{"id":"91254f4.8fe1bb","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1138.8096466064453,"y":4208.00883102417,"z":"4e44f4dc.d3fbac","wires":[["a4deaa00.e82908"]]},{"id":"66145063.39707","type":"returnFailure","name":"return failure","xml":"<return 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":1428.8095321655273,"y":4161.770775794983,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"a0fc8588.9798e8","type":"execute","name":"execute PropertiesNode","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":495.95240020751953,"y":233.84224128723145,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"e8e240a8.b6802","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":712.6190414428711,"y":1863.2470073699951,"z":"4e44f4dc.d3fbac","wires":[["fda0d94d.246058"]]},{"id":"6ba58c99.3d6c54","type":"switchNode","name":"switch ecomp-naming","xml":"<switch test='`$db.vf-model.ecomp-generated-naming`'>\n","comments":"","outputs":1,"x":1090.2384300231934,"y":1763.961443901062,"z":"4e44f4dc.d3fbac","wires":[["6bc3ca08.30d814","1bd7e0e4.afcd3f","59311d10.015684"]]},{"id":"fda0d94d.246058","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":858.3335418701172,"y":1863.247124671936,"z":"4e44f4dc.d3fbac","wires":[["6ba58c99.3d6c54","68402099.cbb6e"]]},{"id":"1bd7e0e4.afcd3f","type":"outcome","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":1276.6668167114258,"y":1764.4375705718994,"z":"4e44f4dc.d3fbac","wires":[["8abd4d2f.9ce9"]]},{"id":"8abd4d2f.9ce9","type":"returnFailure","name":"return failure","xml":"<return 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":1430.9526023864746,"y":1783.009015083313,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"6bc3ca08.30d814","type":"outcome","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1276.6668090820312,"y":1723.0090246200562,"z":"4e44f4dc.d3fbac","wires":[["d6abe0cd.f17a7"]]},{"id":"59311d10.015684","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1276.6667556762695,"y":1807.2947025299072,"z":"4e44f4dc.d3fbac","wires":[["8abd4d2f.9ce9"]]},{"id":"d6abe0cd.f17a7","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1413.809726715088,"y":1723.151891708374,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"9b1fc0be.8fa7","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":697.8097686767578,"y":2217.866183280945,"z":"4e44f4dc.d3fbac","wires":[["68621ac1.29c734"]]},{"id":"68621ac1.29c734","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":863.5717315673828,"y":2216.7234535217285,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"e954ebf6.540d38","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":1748.643009185791,"y":1913.0089440345764,"z":"4e44f4dc.d3fbac","wires":[["e58cf0cd.381b5","7d1e3ef3.b14f9"]]},{"id":"e58cf0cd.381b5","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2025.7858123779297,"y":1886.5804772377014,"z":"4e44f4dc.d3fbac","wires":[["f78aa92e.072f88"]]},{"id":"7d1e3ef3.b14f9","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2030.5475578308105,"y":1931.9613881111145,"z":"4e44f4dc.d3fbac","wires":[["67192240.ef86fc"]]},{"id":"8e80323.5aec3d","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.action' value='ASSIGN' />\n<parameter name='generate-unique-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\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","comments":"","x":1703.6432609558105,"y":1864.1042637825012,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"67192240.ef86fc","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":2253.4519538879395,"y":1931.4374632835388,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"f78aa92e.072f88","type":"returnFailure","name":"return failure","xml":"<return 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":2179.3572731018066,"y":1886.0089869499207,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"68402099.cbb6e","type":"switchNode","name":"switch naming-policy","xml":"<switch test='`$db.vf-model.naming-policy`'>\n","comments":"","outputs":1,"x":1088.024013519287,"y":1972.2470607757568,"z":"4e44f4dc.d3fbac","wires":[["a1c920b0.57e32","54eaf052.a1d45"]]},{"id":"a1c920b0.57e32","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1278.0239448547363,"y":1893.675615310669,"z":"4e44f4dc.d3fbac","wires":[["bccad88.6a02328"]]},{"id":"54eaf052.a1d45","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1278.2621841430664,"y":2021.056559562683,"z":"4e44f4dc.d3fbac","wires":[["334f9686.9dd50a"]]},{"id":"bccad88.6a02328","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1430.8812141418457,"y":1892.2470817565918,"z":"4e44f4dc.d3fbac","wires":[["8e80323.5aec3d","e954ebf6.540d38"]]},{"id":"f9872f82.e6538","type":"call","name":"call GENERIC-RESOURCE-API:naming-policy-generate-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' >\n","comments":"","outputs":1,"x":1769.9291381835938,"y":2036.7709412574768,"z":"4e44f4dc.d3fbac","wires":[["63e66d57.ad35d4","47bb6c9e.5da7d4"]]},{"id":"334f9686.9dd50a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1432.786033630371,"y":2021.056559562683,"z":"4e44f4dc.d3fbac","wires":[["7ca84586.ce108c","f9872f82.e6538"]]},{"id":"7ca84586.ce108c","type":"set","name":"set variables for generating name","xml":"<set>\n<parameter name='naming-policy-generate-name-input.policy-instance-name' value='`$db.vf-model.naming-policy`' />\n<parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />\n<parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='naming-policy-generate-name-input.action' value='ASSIGN' />\n<parameter name='naming-policy-generate-name-input.query-parameter' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`' />","comments":"","x":1679.929054260254,"y":1991.05659532547,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"1c84fc68.b37734","type":"returnFailure","name":"return failure","xml":"<return 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 generate VNF name\" />\n","comments":"","x":2212.786087036133,"y":2010.6278791427612,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"7fa1a5bb.63414c","type":"set","name":"set tmp.vnf-name to generated name","xml":"<set>\n<parameter name='tmp.vnf-name' value='`$naming-policy-generate-name-output.vnf-name`' />\n","comments":"","x":2291.214656829834,"y":2055.3421812057495,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"159fe4a1.e3dfcb","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1802.6188735961914,"y":2735.746706008911,"z":"4e44f4dc.d3fbac","wires":[["10cd1a1d.c198e6","1a70e102.4df24f"]]},{"id":"1a70e102.4df24f","type":"call","name":"call GENERIC-RESOURCE-API:naming-policy-generate-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' >\n","comments":"","outputs":1,"x":2126.9045791625977,"y":2762.3182373046875,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"10cd1a1d.c198e6","type":"set","name":"set variables for deleting name","xml":"<set>\n<parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />\n<parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='naming-policy-generate-name-input.action' value='DELETE' />\n","comments":"","x":2028.3331985473633,"y":2715.175308227539,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"b587067c.c12fd8","type":"comment","name":"Unassign the VNF name","info":"","comments":"","x":1894.2855224609375,"y":2655.746808052063,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"e0c152ab.e7e04","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":914.2857818603516,"y":2922.4135060310364,"z":"4e44f4dc.d3fbac","wires":[["f16260c8.4591b","159fe4a1.e3dfcb"]]},{"id":"a42ab710.cce278","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":912.6190643310547,"y":2964.080258369446,"z":"4e44f4dc.d3fbac","wires":[["4676d832.85c178","159fe4a1.e3dfcb"]]},{"id":"b6ad7e13.cbdb8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":769.2857360839844,"y":3145.7468881607056,"z":"4e44f4dc.d3fbac","wires":[["f7a16dbf.78dcf","159fe4a1.e3dfcb"]]},{"id":"7f628377.de20fc","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1060.9524230957031,"y":3235.7468881607056,"z":"4e44f4dc.d3fbac","wires":[["7fcd46cd.478d88","159fe4a1.e3dfcb"]]},{"id":"85a5708b.39733","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1297.6190490722656,"y":3388.0801401138306,"z":"4e44f4dc.d3fbac","wires":[["b5a9325f.8e06e","159fe4a1.e3dfcb"]]},{"id":"22276dbf.92cb12","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1295.9523315429688,"y":3429.74689245224,"z":"4e44f4dc.d3fbac","wires":[["91d086d5.905598","159fe4a1.e3dfcb"]]},{"id":"2fba815e.79c32e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1239.2856750488281,"y":3845.7468881607056,"z":"4e44f4dc.d3fbac","wires":[["6395a483.342b9c","159fe4a1.e3dfcb"]]},{"id":"2bf16ac7.c29516","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1272.6190490722656,"y":4162.413392066956,"z":"4e44f4dc.d3fbac","wires":[["66145063.39707","159fe4a1.e3dfcb"]]},{"id":"c2464793.9ffc08","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1492.6190490722656,"y":4290.413392066956,"z":"4e44f4dc.d3fbac","wires":[["2754abb3.b85874","159fe4a1.e3dfcb"]]},{"id":"9d10abef.aa9d68","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1490.9523315429688,"y":4334.080144405365,"z":"4e44f4dc.d3fbac","wires":[["2639188b.f42278","159fe4a1.e3dfcb"]]},{"id":"672f3870.869518","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1355.9524230957031,"y":4407.413392066956,"z":"4e44f4dc.d3fbac","wires":[["32930b6a.86e284","159fe4a1.e3dfcb"]]},{"id":"6e62ccc6.dc7f34","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1354.2857055664062,"y":4451.080144405365,"z":"4e44f4dc.d3fbac","wires":[["9263c515.503118","159fe4a1.e3dfcb"]]},{"id":"db6c1834.e91948","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":802.619083404541,"y":4562.413507461548,"z":"4e44f4dc.d3fbac","wires":[["7baf675.e9c2498","159fe4a1.e3dfcb"]]},{"id":"ec9973e.c6a799","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":800.9523658752441,"y":4606.080259799957,"z":"4e44f4dc.d3fbac","wires":[["3c4d390f.0ff276","159fe4a1.e3dfcb"]]},{"id":"63e66d57.ad35d4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2068.095184326172,"y":2011.6994485855103,"z":"4e44f4dc.d3fbac","wires":[["1c84fc68.b37734"]]},{"id":"47bb6c9e.5da7d4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2072.8569297790527,"y":2057.0803594589233,"z":"4e44f4dc.d3fbac","wires":[["7fa1a5bb.63414c"]]},{"id":"3e07f67c.a7124a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":723.3332824707031,"y":1366.666666984558,"z":"4e44f4dc.d3fbac","wires":[["baf35ab4.de3628","1a10c87.b7e5338"]]},{"id":"537d84c0.249e5c","type":"for","name":"for each instance group id","xml":"<for silentFailure='true' index='inst-group-index' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids_length`' >\n","comments":"","outputs":1,"x":506.66662979125977,"y":1367.333312034607,"z":"4e44f4dc.d3fbac","wires":[["3e07f67c.a7124a"]]},{"id":"baf35ab4.de3628","type":"get-resource","name":"get-resource instance-group","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"instance-group\" \n\t\tkey=\"instance-group.id = $vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids[$inst-group-index].vnf-network-instance-group-id\"\n pfx='aai.instance-group' local-only='false' >\n\n","comments":"","outputs":1,"x":954.6666412353516,"y":1290.0000486373901,"z":"4e44f4dc.d3fbac","wires":[["5a73dff4.a3a92","1cc3de9c.f21291"]]},{"id":"1cc3de9c.f21291","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1168.9128494262695,"y":1308.150897026062,"z":"4e44f4dc.d3fbac","wires":[["8ab060f.9d1f2a"]]},{"id":"5a73dff4.a3a92","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1177.8414459228516,"y":1266.4366302490234,"z":"4e44f4dc.d3fbac","wires":[["6cb384a2.611ddc"]]},{"id":"6cb384a2.611ddc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Cannot find instance group id ' +\n $vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids[$inst-group-index].vnf-network-instance-group-id\n + ' in AAI'`\" />\n","comments":"","x":1350.6666564941406,"y":1264.0000410079956,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"8ab060f.9d1f2a","type":"returnFailure","name":"return failure","xml":"<return 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 instance-group from AAI\" />\n","comments":"","x":1350.6666564941406,"y":1308.0000410079956,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"4cc45d68.737674","type":"execute","name":"printContext","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/bgb-vnf.log' />\n","comments":"","outputs":1,"x":485.8095016479492,"y":2334.2858095169067,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"1a10c87.b7e5338","type":"for","name":"for each relationship","xml":"<for index='rel-index' start='0' end='`$aai.instance-group.relationship-list.relationship_length`' >\n","comments":"","outputs":1,"x":928.3332977294922,"y":1438.3333644866943,"z":"4e44f4dc.d3fbac","wires":[["334e1afb.9c1a56"]]},{"id":"334e1afb.9c1a56","type":"switchNode","name":"switch related-to","xml":"<switch test='`$aai.instance-group.relationship-list.relationship[$rel-index].related-to`'>\n","comments":"","outputs":1,"x":1141.6667404174805,"y":1438.333303451538,"z":"4e44f4dc.d3fbac","wires":[["9ec622df.a4f79"]]},{"id":"9ec622df.a4f79","type":"outcome","name":"collection","xml":"<outcome value='collection'>\n","comments":"","outputs":1,"x":1313.3333778381348,"y":1438.3333854675293,"z":"4e44f4dc.d3fbac","wires":[["f0af7cfb.630f1"]]},{"id":"f0af7cfb.630f1","type":"get-resource","name":"get-resource collection","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"collection\" \n\t\tkey=\"collection.collection-id = $aai.instance-group.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value\"\n pfx='aai.collection' local-only='false' >\n\n","comments":"","outputs":1,"x":1533.3332824707031,"y":1436.6666469573975,"z":"4e44f4dc.d3fbac","wires":[["5a9a2b.446c05d4","ed35d4f2.f5a3d8","86f300a3.7cafb"]]},{"id":"ed35d4f2.f5a3d8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1747.579475402832,"y":1388.1508359909058,"z":"4e44f4dc.d3fbac","wires":[["58b0fdde.ff35b4"]]},{"id":"5a9a2b.446c05d4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1756.508071899414,"y":1346.4365692138672,"z":"4e44f4dc.d3fbac","wires":[["a61328d2.f754c8"]]},{"id":"a61328d2.f754c8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Cannot find collection ' +\n $aai.instance-group.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value\n + ' in AAI'`\" />\n","comments":"","x":1913.3332824707031,"y":1345.0000410079956,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"58b0fdde.ff35b4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"System error retrieving collection from AAI\" />\n","comments":"","x":1913.3332824707031,"y":1389.0000410079956,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"86f300a3.7cafb","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1746.6666831970215,"y":1525.000012397766,"z":"4e44f4dc.d3fbac","wires":[["81df8930.31e0f8"]]},{"id":"81df8930.31e0f8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1899.9998245239258,"y":1524.3333082199097,"z":"4e44f4dc.d3fbac","wires":[["8a522d26.71257","a4f68cb7.668a2","8d0504d7.cdc028","cc147160.20bfe","3198ae9f.e95542"]]},{"id":"8a522d26.71257","type":"for","name":"for each network-instance-group","xml":"<for silentFailure='true' index='nig-index' start='0' end='`$service-data.network-instance-groups.network-instance-group_length`' >\n","comments":"","outputs":1,"x":2138.333168029785,"y":1475.0000562667847,"z":"4e44f4dc.d3fbac","wires":[["9063a8ee.f7faa8"]]},{"id":"a4f68cb7.668a2","type":"set","name":"set found-network-instance-group to false","xml":"<set>\n<parameter name='found-network-instance-group' value='false' />\n","comments":"","x":2168.3331298828125,"y":1428.3334283828735,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"9063a8ee.f7faa8","type":"switchNode","name":"network-instance-group-id matches?","xml":"<switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids[$inst-group-index].vnf-network-instance-group-id\n == $service-data.network-instance-groups.network-instance-group[$nig-index].network-instance-group-id`'>\n","comments":"","outputs":1,"x":2454.9996795654297,"y":1475.0000553131104,"z":"4e44f4dc.d3fbac","wires":[["98d54f6d.c932"]]},{"id":"98d54f6d.c932","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2676.666458129883,"y":1475.0000200271606,"z":"4e44f4dc.d3fbac","wires":[["a9385545.8b31c8"]]},{"id":"a9385545.8b31c8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2806.666488647461,"y":1475.000096321106,"z":"4e44f4dc.d3fbac","wires":[["85ee6cee.1bd2a","a14aee8f.5893a"]]},{"id":"85ee6cee.1bd2a","type":"set","name":"set found-network-instance-group to true","xml":"<set>\n<parameter name='found-network-instance-group' value='true' />\n","comments":"","x":3039.9996643066406,"y":1446.6667213439941,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"a14aee8f.5893a","type":"break","name":"break","xml":"<break>\n","comments":"","x":2933.333278656006,"y":1495.0000915527344,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"8d0504d7.cdc028","type":"switchNode","name":"switch found-network-instance-group","xml":"<switch test='`$found-network-instance-group`'>\n","comments":"","outputs":1,"x":2149.999786376953,"y":1525.0000371932983,"z":"4e44f4dc.d3fbac","wires":[["9189bba.faf6f48"]]},{"id":"9189bba.faf6f48","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2371.666633605957,"y":1525.0000596046448,"z":"4e44f4dc.d3fbac","wires":[["520b2234.8e265c"]]},{"id":"520b2234.8e265c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Could not find network instance group ' +\n $vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids[$inst-group-index].vnf-network-instance-group-id\n + ' in MD-SAL'`\" />\n","comments":"","x":2518.333206176758,"y":1523.3333940505981,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"ed7dcd3d.7a64c","type":"set","name":"set tmp.vnf-network-collection_length to 0","xml":"<set>\n<parameter name='tmp.vnf-network-collection_length' value='0' />\n","comments":"","x":554.9999694824219,"y":1318.3334436416626,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"cc147160.20bfe","type":"set","name":"set vnf-network-collection data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$tmp.vnf-network-collection_length].network-instance-group-function'\n value='`$aai.instance-group.instance-group-function`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$tmp.vnf-network-collection_length].network-instance-group-id'\n value='`$aai.instance-group.id`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$tmp.vnf-network-collection_length].network-collection-service-instance-id'\n value='`$service-data.network-instance-groups.network-instance-group[$nig-index].service-instance-id`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$tmp.vnf-network-collection_length].network-collection-customization-uuid'\n value='`$aai.collection.collection-customization-id`' />\n","comments":"","x":2130.0001106262207,"y":1573.3333730697632,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"3198ae9f.e95542","type":"set","name":"increment tmp.vnf-network-collection_length","xml":"<set>\n<parameter name='tmp.vnf-network-collection_length' value='`$tmp.vnf-network-collection_length + 1`' />\n","comments":"","x":2171.666816711426,"y":1620.0000410079956,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"d4e45ae3.95e8e8","type":"set","name":"set vnf-network-collection_length","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection_length'\n value='`$tmp.vnf-network-collection_length`' />\n","comments":"","x":534.1666641235352,"y":1575.8333930969238,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"5602ea58.f558a4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":711.666690826416,"y":4678.809533119202,"z":"4e44f4dc.d3fbac","wires":[["f145731.7dc939"]]},{"id":"569d159b.7974ac","type":"for","name":"for each instance group id","xml":"<for silentFailure='true' index='inst-group-index' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids_length`' >\n","comments":"","outputs":1,"x":495.00003814697266,"y":4679.4761781692505,"z":"4e44f4dc.d3fbac","wires":[["5602ea58.f558a4"]]},{"id":"f145731.7dc939","type":"save","name":"save generic-vnf relationship to instance-group","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"generic-vnf:relationship-list\"\n key=\"generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-information.vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n <parameter name=\"relationship-list.relationship[0].related-to\" value=\"instance-group\" />\n <parameter name=\"relationship-list.relationship[0].related-link\"\n value=\"`'/aai/v$/network/instance-groups/instance-group/'\n + $vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids[$inst-group-index].vnf-network-instance-group-id`\" />\n","comments":"","outputs":1,"x":995.0000190734863,"y":4678.333213806152,"z":"4e44f4dc.d3fbac","wires":[["aa364f8f.633a1","d50f251f.b38a38"]]},{"id":"2c0352e1.886b8e","type":"returnFailure","name":"return failure","xml":"<return 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":1551.666690826416,"y":4696.666466712952,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"aa364f8f.633a1","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1254.3572425842285,"y":4655.285629272461,"z":"4e44f4dc.d3fbac","wires":[["b6ef2322.ecde1"]]},{"id":"d50f251f.b38a38","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1262.9286727905273,"y":4699.571342468262,"z":"4e44f4dc.d3fbac","wires":[["c25bd07f.ba3dc"]]},{"id":"39611e1d.841192","type":"returnFailure","name":"return failure","xml":"<return 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 relationship in generic-vnf in AAI\" />\n","comments":"","x":1554.357292175293,"y":4653.428730010986,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"b6ef2322.ecde1","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1407.6189270019531,"y":4654.86586856842,"z":"4e44f4dc.d3fbac","wires":[["39611e1d.841192","159fe4a1.e3dfcb"]]},{"id":"c25bd07f.ba3dc","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1405.9522094726562,"y":4698.53262090683,"z":"4e44f4dc.d3fbac","wires":[["2c0352e1.886b8e","159fe4a1.e3dfcb"]]},{"id":"ccd49d85.073d1","type":"switchNode","name":"switch subnet_length","xml":"<switch test='`$aai.l3-network.l3-network[0].subnets.subnet_length`'>\n","comments":"","outputs":1,"x":940.2381057739258,"y":3966.428771018982,"z":"4e44f4dc.d3fbac","wires":[["13f8461f.02754a","4f0f1832.9d6238","4a7eee29.bdad1"]]},{"id":"13f8461f.02754a","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1113.0952682495117,"y":3929.2858304977417,"z":"4e44f4dc.d3fbac","wires":[["d7fec3a.cf03e4"]]},{"id":"4f0f1832.9d6238","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":1114.523838043213,"y":3967.856993675232,"z":"4e44f4dc.d3fbac","wires":[["d7fec3a.cf03e4"]]},{"id":"4a7eee29.bdad1","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1113.095302581787,"y":4006.428385734558,"z":"4e44f4dc.d3fbac","wires":[["7e5c1302.e8982c"]]},{"id":"7e5c1302.e8982c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1234.5238571166992,"y":4006.4286527633667,"z":"4e44f4dc.d3fbac","wires":[["fe91b2bf.8c099","53c17453.f0880c"]]},{"id":"d7fec3a.cf03e4","type":"set","name":"set subnet_length to 0","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='0' />\n","comments":"","x":1305.9524612426758,"y":3937.856993675232,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"6d2f55b8.a2759c","type":"switchNode","name":"switch: sdnc-model-name && sdnc-artifact-name != null","xml":"<switch test=\"`$db.vf-model.sdnc-model-name != '' and $db.vf-model.sdnc-artifact-name != ''`\">","comments":"","outputs":1,"x":1539.8175621032715,"y":949.9999332427979,"z":"4e44f4dc.d3fbac","wires":[["6dd97b97.b67924","7c6a046e.7cc64c"]]},{"id":"6dd97b97.b67924","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1842.8889503479004,"y":922.6785984039307,"z":"4e44f4dc.d3fbac","wires":[["5b2ce020.a36b2"]]},{"id":"86ca6d15.0e146","type":"switchNode","name":"switch: param[].name","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$p].name`\">\n","comments":"","outputs":1,"x":1053.9484024047852,"y":598.2024068832397,"z":"4e44f4dc.d3fbac","wires":[["af0da8d9.d8ece8","6b384f33.32a78"]]},{"id":"63f83908.751498","type":"for","name":"for p in vnf-input-parameters,param[]","xml":"<for silentFailure='true' index='p' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`' >\n","comments":"","outputs":1,"x":760.055549621582,"y":598.7024393081665,"z":"4e44f4dc.d3fbac","wires":[["86ca6d15.0e146"]]},{"id":"e3aa680f.7c2008","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1250.2581176757812,"y":949.9521970748901,"z":"4e44f4dc.d3fbac","wires":[["6d2f55b8.a2759c"]]},{"id":"542091af.e959d","type":"call","name":"call self-serve-vnf-assign","xml":"<call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-assign' mode='sync' >\n","comments":"","outputs":1,"x":2132.257625579834,"y":717.845365524292,"z":"4e44f4dc.d3fbac","wires":[["a34d6a59.d39c18"]]},{"id":"ecba7f02.a0e2c","type":"returnFailure","name":"return failure","xml":"<return 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 self-serve assignment for vnf with vnf-id=' + $vnf-topology-operation-input.vnf-information.vnf-id`\" />\n","comments":"","x":2516.329002380371,"y":717.8453159332275,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"7c6a046e.7cc64c","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1845.78169631958,"y":979.2856025695801,"z":"4e44f4dc.d3fbac","wires":[["ae713fba.3df7f"]]},{"id":"84263c0c.96c43","type":"set","name":"set tmp.exist.sdnc-artifact-name = true","xml":"<set>\n<parameter name='tmp.exist.sdnc-artifact-name' value='true' />","comments":"","x":1595.8413314819336,"y":648.0595769882202,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"ae12ffc.41b2a","type":"set","name":"set tmp.exist.sdnc-model-name = true","xml":"<set>\n<parameter name='tmp.exist.sdnc-model-name' value='true' />\n","comments":"","x":1592.5554389953613,"y":598.0595922470093,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"3f17b073.bbbcb","type":"switchNode","name":"switch: tmp.exist.sdnc-model-name && tmp.exist.sdnc-artifact-name == true","xml":"<switch test=\"`$tmp.exist.sdnc-model-name == 'true' and $tmp.exist.sdnc-artifact-name == 'true'`\">\n","comments":"","outputs":1,"x":877.9960327148438,"y":767.0237197875977,"z":"4e44f4dc.d3fbac","wires":[["d1f392c4.1dab8","e3aa680f.7c2008"]]},{"id":"d1f392c4.1dab8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1246.5079917907715,"y":719.1427278518677,"z":"4e44f4dc.d3fbac","wires":[["5b2ce020.a36b2"]]},{"id":"cd40e494.6d16b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":453.65077209472656,"y":500.8691177368164,"z":"4e44f4dc.d3fbac","wires":[["63f83908.751498","3f17b073.bbbcb","e38b7cc3.75e77","806e0f23.0111b"]]},{"id":"d5dac1e.b0d824","type":"comment","name":"SELF-SERVE FORK","info":"","comments":"","x":442.2221984863281,"y":624.6786069869995,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"af0da8d9.d8ece8","type":"outcome","name":"sdnc_model_name","xml":"<outcome value='sdnc_model_name'>\n","comments":"","outputs":1,"x":1310.1269781930105,"y":598.1072013037544,"z":"4e44f4dc.d3fbac","wires":[["ae12ffc.41b2a"]]},{"id":"6b384f33.32a78","type":"outcome","name":"sdnc_artifact_name","xml":"<outcome value='sdnc_artifact_name'>\n","comments":"","outputs":1,"x":1312.9841003417969,"y":647.5357732772827,"z":"4e44f4dc.d3fbac","wires":[["84263c0c.96c43"]]},{"id":"a34d6a59.d39c18","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2337.555206298828,"y":717.3333969116211,"z":"4e44f4dc.d3fbac","wires":[["ecba7f02.a0e2c"]]},{"id":"11bf25d2.bdb8da","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":233.4126968383789,"y":234.2857322692871,"z":"4e44f4dc.d3fbac","wires":[["a0fc8588.9798e8","b32ac93e.aaa508","3e444c8d.9a16f4","cd40e494.6d16b8"]]},{"id":"b10f2375.b9afa","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1575.71431350708,"y":3985.0328483581543,"z":"4e44f4dc.d3fbac","wires":[["5bcbda97.98c4e4","3b85bc8c.02f794","e6ea74fb.9af718","f638c11c.6fd0e"]]},{"id":"cdefc051.a04bf","type":"set","name":"clear aai.l3-network","xml":"<set>\n<parameter name='aai.l3-network.' value='' />\n","comments":"","x":934.285758972168,"y":3357.8899669647217,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"6f9b0a93.f694a4","type":"break","name":"break","xml":"<break>\n","comments":"","x":3375.9996948242188,"y":3885.032530784607,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"be0cee42.5ab7e","type":"set","name":"set found-network to false","xml":"<set>\n<parameter name='found-network' value='false' />\n","comments":"","x":1075.7142868041992,"y":3590.746934890747,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"46c88819.e15b38","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2047.4285926818848,"y":3745.0327310562134,"z":"4e44f4dc.d3fbac","wires":[["9833efbf.69304","5f2e36ac.da9228"]]},{"id":"5f2e36ac.da9228","type":"switchNode","name":"switch found-network","xml":"<switch test='`$found-network`'>\n","comments":"","outputs":1,"x":2238.8571395874023,"y":3775.0327854156494,"z":"4e44f4dc.d3fbac","wires":[["66e2cd5f.2e0f04"]]},{"id":"2a1ad752.bfcd38","type":"set","name":"set found-network to true","xml":"<set>\n<parameter name='found-network' value='true' />\n","comments":"","x":3431.714572906494,"y":3839.318211555481,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"66e2cd5f.2e0f04","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2407.4286308288574,"y":3775.03271484375,"z":"4e44f4dc.d3fbac","wires":[["10d190b5.dcecdf"]]},{"id":"10d190b5.dcecdf","type":"break","name":"break","xml":"<break>\n","comments":"","x":2537.428699493408,"y":3773.604108810425,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"45b722b6.db776c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1247.7143096923828,"y":3718.7470092773438,"z":"4e44f4dc.d3fbac","wires":[["2b805935.a35cb6","c7e830d3.e9283"]]},{"id":"c7e830d3.e9283","type":"switchNode","name":"switch found-network","xml":"<switch test='`$found-network`'>\n","comments":"","outputs":1,"x":1457.7142639160156,"y":3790.746892929077,"z":"4e44f4dc.d3fbac","wires":[["24156eb7.6d1de2"]]},{"id":"24156eb7.6d1de2","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1626.2857551574707,"y":3790.7468223571777,"z":"4e44f4dc.d3fbac","wires":[["25a3a86e.400be8"]]},{"id":"25a3a86e.400be8","type":"break","name":"break","xml":"<break>\n","comments":"","x":1756.2858238220215,"y":3789.3182163238525,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"e38b7cc3.75e77","type":"set","name":"initialize tmp.exist.sdnc-model-name && tmp.exist.sdnc-artifact-name = false","xml":"<set>\n<parameter name='tmp.exist.sdnc-model-name' value='false' />\n<parameter name='tmp.exist.sdnc-artifact-name' value='false' />","comments":"","x":880.1429061889648,"y":501.33330821990967,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"fb1b0696.2b0118","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":2098.666561126709,"y":879.9999332427979,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"893e0d25.a86ef","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":2188.480007171631,"y":782.3374137878418,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"f4cb36d0.800108","type":"execute","name":"printContext","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/ss-vnfend.log' />\n","comments":"","outputs":1,"x":2093.5712890625,"y":828.7771825790405,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"5b2ce020.a36b2","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1899.6664695739746,"y":718.3333206176758,"z":"4e44f4dc.d3fbac","wires":[["542091af.e959d","893e0d25.a86ef","f4cb36d0.800108","fb1b0696.2b0118"]]},{"id":"e6ea74fb.9af718","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='`$tmp.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].neutron-subnet-id`' />\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].sdnc-subnet-id'\n value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-id`' />\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-role'\n value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-role`' />\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-name'\n value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-name`' />\n","comments":"","x":1730.0000801086426,"y":4015.7145948410034,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"f638c11c.6fd0e","type":"switchNode","name":"switch dhcp-enabled","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].dhcp-enabled`'>\n","comments":"","outputs":1,"x":1744.5238609313965,"y":4068.557548522949,"z":"4e44f4dc.d3fbac","wires":[["1616a214.4d52fe","6cb55598.b5519c"]]},{"id":"1616a214.4d52fe","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1907.3810255868093,"y":4047.12890625,"z":"4e44f4dc.d3fbac","wires":[["9228e480.6386e8"]]},{"id":"6cb55598.b5519c","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1905.9523582458496,"y":4092.8433322906494,"z":"4e44f4dc.d3fbac","wires":[["10fd862a.7096da"]]},{"id":"9228e480.6386e8","type":"set","name":"set dhcp-enabled to Y","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].dhcp-enabled'\n value='Y' />\n","comments":"","x":2080.238224029541,"y":4045.7003021240234,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"10fd862a.7096da","type":"set","name":"set dhcp-enabled to N","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].dhcp-enabled'\n value='N' />\n","comments":"","x":2077.3809928894043,"y":4092.8433322906494,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"5bcbda97.98c4e4","type":"switchNode","name":"switch subnet-role","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-role`'>\n","comments":"","outputs":1,"x":1745.0000305175781,"y":3897.6052207946777,"z":"4e44f4dc.d3fbac","wires":[["2f3e4a5d.7c3b36"]]},{"id":"2f3e4a5d.7c3b36","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1911.666633605957,"y":3897.6048727035522,"z":"4e44f4dc.d3fbac","wires":[["24afcaa5.1defa6"]]},{"id":"24afcaa5.1defa6","type":"set","name":"set subnet-role to NONE","xml":"<set>\n<parameter name='aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-role' value='NONE' />\n","comments":"","x":2093.3334197998047,"y":3896.93852519989,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"3b85bc8c.02f794","type":"switchNode","name":"switch ip-version","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].ip-version`'>\n","comments":"","outputs":1,"x":1740.2383651733398,"y":3962.096326828003,"z":"4e44f4dc.d3fbac","wires":[["1c2233e9.20214c","e680d1ed.d7f9c"]]},{"id":"1c2233e9.20214c","type":"outcome","name":"4","xml":"<outcome value='4'>\n","comments":"","outputs":1,"x":1905.952507019043,"y":3943.524724006653,"z":"4e44f4dc.d3fbac","wires":[["f01b1452.dd9f88"]]},{"id":"e680d1ed.d7f9c","type":"outcome","name":"6","xml":"<outcome value='6'>\n","comments":"","outputs":1,"x":1905.9524688720703,"y":3984.9534673690796,"z":"4e44f4dc.d3fbac","wires":[["319040e.ea0d5c"]]},{"id":"f01b1452.dd9f88","type":"set","name":"set tmp.ip-version to ipv4","xml":"<set>\n<parameter name='tmp.ip-version' value='ipv4' />\n","comments":"","x":2093.095272064209,"y":3942.6676511764526,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"319040e.ea0d5c","type":"set","name":"set tmp.ip-version to ipv6","xml":"<set>\n<parameter name='tmp.ip-version' value='ipv6' />\n","comments":"","x":2091.6668243408203,"y":3984.953469276428,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"806e0f23.0111b","type":"switchNode","name":"switch: vnf-input-parameters.param_length","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`\">\n","comments":"","outputs":1,"x":778.5714645385742,"y":547.1428127288818,"z":"4e44f4dc.d3fbac","wires":[["f780fd19.5435b"]]},{"id":"f780fd19.5435b","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1042.1428833007812,"y":547.4285526275635,"z":"4e44f4dc.d3fbac","wires":[["7fdf9810.65be18"]]},{"id":"7fdf9810.65be18","type":"set","name":"set vnf-input-parameters.param_length = 0","xml":"<set>\n<parameter name='vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length' value='0' />\n","comments":"","x":1315.8571243286133,"y":547.2857141494751,"z":"4e44f4dc.d3fbac","wires":[]}] \ No newline at end of file
+[{"id":"f07e5af5.2a81a8","type":"dgstart","name":"DGSTART","outputs":1,"x":100,"y":80.74699592590332,"z":"4e44f4dc.d3fbac","wires":[["7dfb89c0.30c288"]]},{"id":"7dfb89c0.30c288","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":215.28570556640625,"y":122.65177536010742,"z":"4e44f4dc.d3fbac","wires":[["1bd914ea.94267b"]]},{"id":"1bd914ea.94267b","type":"method","name":"method vnf-topology-operation-assign","xml":"<method rpc='vnf-topology-operation-assign' mode='sync'>\n","comments":"","outputs":1,"x":188.09530639648438,"y":165.41365909576416,"z":"4e44f4dc.d3fbac","wires":[["11bf25d2.bdb8da"]]},{"id":"2e619ce7.bf2e34","type":"comment","name":"vnf-topology-operation-assign","info":"","comments":"","x":476.0115280151367,"y":30,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"b32ac93e.aaa508","type":"switchNode","name":"switch request-action","xml":"<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":486.3809509277344,"y":313.8898277282715,"z":"4e44f4dc.d3fbac","wires":[["95fe5c1b.234a3","1c086997.eb74d6"]]},{"id":"95fe5c1b.234a3","type":"outcome","name":"CreateVnfInstance","xml":"<outcome value='CreateVnfInstance'>\n","comments":"","outputs":1,"x":740.0952453613281,"y":291.0327091217041,"z":"4e44f4dc.d3fbac","wires":[["b3d6c559.f5a1f8"]]},{"id":"1c086997.eb74d6","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":702.0952110290527,"y":336.7470369338989,"z":"4e44f4dc.d3fbac","wires":[["3d3a9ebb.853872"]]},{"id":"b3d6c559.f5a1f8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":924.9523735046387,"y":291.0327386856079,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"3d3a9ebb.853872","type":"returnFailure","name":"return failure","xml":"<return 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":942.0952186584473,"y":336.746994972229,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"ae713fba.3df7f","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":186.07147216796875,"y":1577.7707920074463,"z":"4e44f4dc.d3fbac","wires":[["78a8ab8d.e4a224","766c94ea.b9611c","434cb265.75e27c","a6c6204f.95895","b69f4291.61fa5","f416891b.c49b38","b1c5abc7.29b208","c969fd25.a5dbc","5551cb18.77a4d4","27e79a76.199b26","68282397.14338c","4cef2e4e.2eeb7","b4645e2b.83793","19423cf4.442143","59cc3158.776f9","2eaa370.dfe9cca","ab5ed0d2.dee8c","2dd176ed.0041ba","acbd5170.3e4c4","60684400.780c7c","31bebad4.8a5896","438000d4.31b1e","6f6caf00.d957c","277ce9ee.277656","56e0bd4b.bd3f64","58f81e72.df87b","719fd6d4.9a4d78","1fd770ea.bfd8af","183d18f7.8083e7","537d84c0.249e5c","4cc45d68.737674","ed7dcd3d.7a64c","d4e45ae3.95e8e8","569d159b.7974ac"]]},{"id":"3e444c8d.9a16f4","type":"get-resource","name":"get-resource VF_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.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":498.7142562866211,"y":405.0326976776123,"z":"4e44f4dc.d3fbac","wires":[["474b191f.eb1888","e8e33d1a.e987"]]},{"id":"f4e1f5bf.f95318","type":"returnFailure","name":"return failure","xml":"<return 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":940.1427345275879,"y":428.46118354797363,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"474b191f.eb1888","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":699.4999542236328,"y":385.413535118103,"z":"4e44f4dc.d3fbac","wires":[["bd82a433.1ab928"]]},{"id":"e8e33d1a.e987","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":708.0713844299316,"y":429.6992483139038,"z":"4e44f4dc.d3fbac","wires":[["f4e1f5bf.f95318"]]},{"id":"bd82a433.1ab928","type":"returnFailure","name":"return failure","xml":"<return 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":939.4999351501465,"y":383.5564422607422,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"78a8ab8d.e4a224","type":"switchNode","name":"switch service-data.vnfs.vnf_length","xml":"<switch test='`$service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":532.3809204101562,"y":1155.9851322174072,"z":"4e44f4dc.d3fbac","wires":[["120eef5e.ea3881","a22c3ff8.e2fb3"]]},{"id":"120eef5e.ea3881","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":758.0952491760254,"y":1123.1279201507568,"z":"4e44f4dc.d3fbac","wires":[["b7dbc5c1.1c67c8"]]},{"id":"b7dbc5c1.1c67c8","type":"set","name":"set vnf-index=0","xml":"<set>\n<parameter name='vnf-index' value='0' />\n","comments":"","x":922.3809700012207,"y":1122.1279983520508,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"a22c3ff8.e2fb3","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":759.523811340332,"y":1187.4137382507324,"z":"4e44f4dc.d3fbac","wires":[["41b7f789.ac4538"]]},{"id":"93cbad48.90b08","type":"set","name":"set vnf-index = vnf_length","xml":"<set>\n<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />\n","comments":"","x":1098.3809661865234,"y":1165.699426651001,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"a06ff958.ca8818","type":"for","name":"for each existing VNF","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":1083.8094787597656,"y":1211.6993656158447,"z":"4e44f4dc.d3fbac","wires":[["8b898020.e1666"]]},{"id":"41b7f789.ac4538","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":895.2380714416504,"y":1187.413703918457,"z":"4e44f4dc.d3fbac","wires":[["93cbad48.90b08","a06ff958.ca8818"]]},{"id":"8b898020.e1666","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":1438.0952453613281,"y":1211.270845413208,"z":"4e44f4dc.d3fbac","wires":[["b372ccf2.90f5f"]]},{"id":"b372ccf2.90f5f","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1732.3810005187988,"y":1210.8423299789429,"z":"4e44f4dc.d3fbac","wires":[["2889470.ea41bba"]]},{"id":"2889470.ea41bba","type":"returnFailure","name":"return failure","xml":"<return 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'`\" />\n","comments":"","x":1880.9523620605469,"y":1210.8422775268555,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"11adb872.3cc0d8","type":"comment","name":"make sure this VNF doesn't exist already","info":"","comments":"","x":1425.2379760742188,"y":1168.8422756195068,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"766c94ea.b9611c","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":498.0952033996582,"y":1687.6518993377686,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"434cb265.75e27c","type":"switchNode","name":"switch input vnf-name","xml":"<switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-name`'>\n","comments":"","outputs":1,"x":510.59522247314453,"y":2049.770956993103,"z":"4e44f4dc.d3fbac","wires":[["e8e240a8.b6802","9b1fc0be.8fa7"]]},{"id":"a6c6204f.95895","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 = $prop.cloud-region.cloud-owner AND \n\t\t cloud-region.cloud-region-id = $vnf-topology-operation-input.vnf-request-input.aic-cloud-region AND\n\t\t depth='all'\"\n pfx='aai.cloud-region' local-only='false' >\n\n","comments":"","outputs":1,"x":542.738166809082,"y":2945.7706928253174,"z":"4e44f4dc.d3fbac","wires":[["8e720469.5e8cb8","7b05d3d.76e1b2c"]]},{"id":"7b05d3d.76e1b2c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":767.9843597412109,"y":2963.921548843384,"z":"4e44f4dc.d3fbac","wires":[["a42ab710.cce278"]]},{"id":"4676d832.85c178","type":"returnFailure","name":"return failure","xml":"<return 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":1069.6510314941406,"y":2963.9215660095215,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"8e720469.5e8cb8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":776.912956237793,"y":2922.207282066345,"z":"4e44f4dc.d3fbac","wires":[["e0c152ab.e7e04"]]},{"id":"f16260c8.4591b","type":"returnFailure","name":"return failure","xml":"<return 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":1069.9289321899414,"y":2921.512840270996,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"b69f4291.61fa5","type":"get-resource","name":"get-resource VF_TO_NETWORK_ROLE_MAPPING","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.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":607.9762496948242,"y":3256.8182125091553,"z":"4e44f4dc.d3fbac","wires":[["60a87727.b01328","35785ae2.8b74a6"]]},{"id":"60a87727.b01328","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":903.7619209289551,"y":3235.532377243042,"z":"4e44f4dc.d3fbac","wires":[["7f628377.de20fc"]]},{"id":"35785ae2.8b74a6","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":912.3333511352539,"y":3279.818090438843,"z":"4e44f4dc.d3fbac","wires":[["cb783055.50a9a"]]},{"id":"7fcd46cd.478d88","type":"returnFailure","name":"return failure","xml":"<return 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":1220.428544998169,"y":3235.342109680176,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"7b16dda0.235334","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1039.5716705322266,"y":3728.1274967193604,"z":"4e44f4dc.d3fbac","wires":[["9c162cfb.04057","32d1bfdb.27738","7cbe8d03.77d1c4","9ecaa4ff.23c328","4bcf8a69.ae8c44","8025807.9d68d8","ccd49d85.073d1","cdefc051.a04bf"]]},{"id":"7cbe8d03.77d1c4","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":1272.4287300109863,"y":3409.080026626587,"z":"4e44f4dc.d3fbac","wires":[["9891f515.8ee1c8","94d72e9b.4db64"]]},{"id":"94d72e9b.4db64","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1476.4764442443848,"y":3431.2228660583496,"z":"4e44f4dc.d3fbac","wires":[["22276dbf.92cb12"]]},{"id":"91d086d5.905598","type":"returnFailure","name":"return failure","xml":"<return 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":1791.476474761963,"y":3431.556209564209,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"9891f515.8ee1c8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1485.4050407409668,"y":3389.508599281311,"z":"4e44f4dc.d3fbac","wires":[["85a5708b.39733"]]},{"id":"b5a9325f.8e06e","type":"returnFailure","name":"return failure","xml":"<return 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":1790.087670326233,"y":3390.4807357788086,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"9c162cfb.04057","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":1261.6193199157715,"y":3896.0802698135376,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"5551cb18.77a4d4","type":"for","name":"for each cloud-region availability zone","xml":"<for index='idx' start='0' end='`$aai.cloud-region.availability-zones.availability-zone_length`' >\n","comments":"","outputs":1,"x":535.0003356933594,"y":4313.199224472046,"z":"4e44f4dc.d3fbac","wires":[["858bb9df.ef0b98"]]},{"id":"420bf10a.3f71f","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.cloud-region.availability-zones.availability-zone[$idx].availability-zone-name`' />\n","comments":"","x":996.6670188903809,"y":4282.532638549805,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"27e79a76.199b26","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":494.6192626953125,"y":4163.151584625244,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"cbb1f011.821ee","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":961.1907958984375,"y":4456.961437225342,"z":"4e44f4dc.d3fbac","wires":[["32a6aa28.4d7b46","22485f0b.22ad6"]]},{"id":"b4645e2b.83793","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":454.4288101196289,"y":4922.579827308655,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"4cef2e4e.2eeb7","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":544.2422561645508,"y":4824.917307853699,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"b1c5abc7.29b208","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":499.57160568237305,"y":3701.4611654281616,"z":"4e44f4dc.d3fbac","wires":[["ed4c9615.d61838"]]},{"id":"f416891b.c49b38","type":"set","name":"set network-index = 0","xml":"<set>\n<parameter name='network-index' value='0' />\n","comments":"","x":510.40474700927734,"y":3310.8660068511963,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"32d1bfdb.27738","type":"set","name":"increment network-index","xml":"<set>\n<parameter name='network-index' value='`$network-index + 1`' />\n","comments":"","x":1271.95267868042,"y":4050.842246055603,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"c969fd25.a5dbc","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":493.4763488769531,"y":4113.151628494263,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"68282397.14338c","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":459.7620849609375,"y":4772.580139160156,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"19423cf4.442143","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":484.1907043457031,"y":4455.961353302002,"z":"4e44f4dc.d3fbac","wires":[["5f481128.d6fd6"]]},{"id":"5f481128.d6fd6","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":687.8573455810547,"y":4455.961314201355,"z":"4e44f4dc.d3fbac","wires":[["cbb1f011.821ee"]]},{"id":"59cc3158.776f9","type":"set","name":"set new vnf_length","xml":"<set>\n<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />\n","comments":"","x":481.02384185791016,"y":1208.0090227127075,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"2eaa370.dfe9cca","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":555.5952911376953,"y":3033.008864402771,"z":"4e44f4dc.d3fbac","wires":[["e5925a76.815c58"]]},{"id":"e5925a76.815c58","type":"switchNode","name":"switch related-to","xml":"<switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>\n","comments":"","outputs":1,"x":803.2738342285156,"y":3032.7587938308716,"z":"4e44f4dc.d3fbac","wires":[["3699dec9.348a82"]]},{"id":"3699dec9.348a82","type":"outcome","name":"complex","xml":"<outcome value='complex'>\n","comments":"","outputs":1,"x":972.7381553649902,"y":3032.1516160964966,"z":"4e44f4dc.d3fbac","wires":[["ed1ad94c.99ecb8"]]},{"id":"98e2f8af.a2f578","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":1293.4524536132812,"y":3031.8182735443115,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"ab5ed0d2.dee8c","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":488.64291763305664,"y":3146.1039962768555,"z":"4e44f4dc.d3fbac","wires":[["cd42ad7f.c7287"]]},{"id":"cd42ad7f.c7287","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":636.7857513427734,"y":3146.103979110718,"z":"4e44f4dc.d3fbac","wires":[["b6ad7e13.cbdb8"]]},{"id":"f7a16dbf.78dcf","type":"returnFailure","name":"return failure","xml":"<return 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":927.2619438171387,"y":3147.3420248031616,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"817e056c.b110d8","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.0954627990723,"y":2504.9612531661987,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"4527349c.9a52ec","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":1381.8812980651855,"y":3720.6516485214233,"z":"4e44f4dc.d3fbac","wires":[["45b722b6.db776c"]]},{"id":"2b805935.a35cb6","type":"switchNode","name":"switch orchestration-status","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].orchestration-status`'>\n","comments":"","outputs":1,"x":1800.4524688720703,"y":3655.2231130599976,"z":"4e44f4dc.d3fbac","wires":[["b291cd89.5e04","688efdb4.26b7f4","1dbdf0e3.6d4c4f","3bfc9f47.c3df5","8f5abb8c.6c74f8"]]},{"id":"b291cd89.5e04","type":"outcome","name":"Pending Delete","xml":"<outcome value='Pending Delete'>\n","comments":"","outputs":1,"x":2041.1193389892578,"y":3696.8896169662476,"z":"4e44f4dc.d3fbac","wires":[["757bdd4d.6abe74"]]},{"id":"688efdb4.26b7f4","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2013.9764785766602,"y":3747.8895978927612,"z":"4e44f4dc.d3fbac","wires":[["47f9fe3b.cd325"]]},{"id":"9833efbf.69304","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":2549.6909255981445,"y":3716.460892677307,"z":"4e44f4dc.d3fbac","wires":[["440449fc.68ede8"]]},{"id":"47f9fe3b.cd325","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":2183.976390838623,"y":3747.4609746932983,"z":"4e44f4dc.d3fbac","wires":[["46c88819.e15b38"]]},{"id":"440449fc.68ede8","type":"outcome","name":"cloud-region","xml":"<outcome value='cloud-region'>\n","comments":"","outputs":1,"x":2723.9765663146973,"y":3716.0323390960693,"z":"4e44f4dc.d3fbac","wires":[["3d11cc80.c4e0c4"]]},{"id":"3d11cc80.c4e0c4","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":2921.1192665100098,"y":3716.4608068466187,"z":"4e44f4dc.d3fbac","wires":[["ced7a748.131728"]]},{"id":"ced7a748.131728","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":3152.547866821289,"y":3716.032181739807,"z":"4e44f4dc.d3fbac","wires":[["92fbe3e9.e193d"]]},{"id":"92fbe3e9.e193d","type":"outcome","name":"cloud-region.cloud-region-id","xml":"<outcome value='cloud-region.cloud-region-id'>\n","comments":"","outputs":1,"x":3393.976432800293,"y":3716.032278060913,"z":"4e44f4dc.d3fbac","wires":[["3d76bce7.883fc4"]]},{"id":"3d76bce7.883fc4","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":3698.262351989746,"y":3715.8893337249756,"z":"4e44f4dc.d3fbac","wires":[["5f95e58e.702e5c"]]},{"id":"5f95e58e.702e5c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3403.2624893188477,"y":3833.5322875976562,"z":"4e44f4dc.d3fbac","wires":[["a7f11203.5d359"]]},{"id":"9ecaa4ff.23c328","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1218.0954704284668,"y":3651.9372930526733,"z":"4e44f4dc.d3fbac","wires":[["4527349c.9a52ec","be0cee42.5ab7e"]]},{"id":"4bcf8a69.ae8c44","type":"set","name":"set l3-network-id = -1","xml":"<set>\n<parameter name='l3-network-id' value='-1' />\n","comments":"","x":1262.4288291931152,"y":3523.8419466018677,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"a7f11203.5d359","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3549.0954666137695,"y":3833.0083961486816,"z":"4e44f4dc.d3fbac","wires":[["afc40b2f.c29e28","6f9b0a93.f694a4","2a1ad752.bfcd38"]]},{"id":"afc40b2f.c29e28","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":3784.333469390869,"y":3795.1513652801514,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"8025807.9d68d8","type":"switchNode","name":"switch l3-network-id","xml":"<switch test='`$l3-network-id`'>\n","comments":"","outputs":1,"x":1259.42875289917,"y":3847.508988380432,"z":"4e44f4dc.d3fbac","wires":[["aa114731.395c08"]]},{"id":"aa114731.395c08","type":"outcome","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":1429.4287033081055,"y":3847.508744239807,"z":"4e44f4dc.d3fbac","wires":[["2fba815e.79c32e"]]},{"id":"6395a483.342b9c","type":"returnFailure","name":"return failure","xml":"<return 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":1712.7620658874512,"y":3847.5089931488037,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"2dd176ed.0041ba","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":558.9525375366211,"y":2527.7856969833374,"z":"4e44f4dc.d3fbac","wires":[["d5c66a20.2113f8","4eb518d2.0c93e8"]]},{"id":"d5c66a20.2113f8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":764.6192092895508,"y":2504.9286603927612,"z":"4e44f4dc.d3fbac","wires":[["817e056c.b110d8"]]},{"id":"4eb518d2.0c93e8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":766.0478057861328,"y":2549.2142515182495,"z":"4e44f4dc.d3fbac","wires":[["7ce719fb.9a6228"]]},{"id":"7ce719fb.9a6228","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":920.3335418701172,"y":2548.6428236961365,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"ef5faa7d.94cb58","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.0477333068848,"y":2593.4999294281006,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"acbd5170.3e4c4","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":531.5715560913086,"y":2616.3244342803955,"z":"4e44f4dc.d3fbac","wires":[["ce65d89f.20afc8","34fc501b.a39a8"]]},{"id":"ce65d89f.20afc8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":765.5715293884277,"y":2593.467366218567,"z":"4e44f4dc.d3fbac","wires":[["ef5faa7d.94cb58"]]},{"id":"34fc501b.a39a8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":767.0001258850098,"y":2637.752957344055,"z":"4e44f4dc.d3fbac","wires":[["f5981394.788ef"]]},{"id":"f5981394.788ef","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":921.2858619689941,"y":2637.181529521942,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"538946a2.181668","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":913.1906661987305,"y":2682.3571367263794,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"60684400.780c7c","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":539.714427947998,"y":2705.1815814971924,"z":"4e44f4dc.d3fbac","wires":[["e137a9dc.787888","5fc591ca.bc88b"]]},{"id":"e137a9dc.787888","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":762.714412689209,"y":2682.324543952942,"z":"4e44f4dc.d3fbac","wires":[["538946a2.181668"]]},{"id":"5fc591ca.bc88b","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":764.143009185791,"y":2726.61013507843,"z":"4e44f4dc.d3fbac","wires":[["b9a36199.dc978"]]},{"id":"b9a36199.dc978","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":918.4287452697754,"y":2726.038707256317,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"855b2ca8.132f9","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":913.1906661987305,"y":2769.4999589920044,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"31bebad4.8a5896","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":534.714427947998,"y":2792.3244037628174,"z":"4e44f4dc.d3fbac","wires":[["7a7f7561.1b9f2c","af9f8b2b.cd7db8"]]},{"id":"7a7f7561.1b9f2c","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":762.714412689209,"y":2769.467366218567,"z":"4e44f4dc.d3fbac","wires":[["855b2ca8.132f9"]]},{"id":"af9f8b2b.cd7db8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":764.143009185791,"y":2813.752957344055,"z":"4e44f4dc.d3fbac","wires":[["f010777f.4fc4a8"]]},{"id":"f010777f.4fc4a8","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":918.4287452697754,"y":2813.181529521942,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"757bdd4d.6abe74","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2194.3334312438965,"y":3697.666494369507,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"8f5abb8c.6c74f8","type":"outcome","name":"PendingDelete","xml":"<outcome value='PendingDelete'>\n","comments":"","outputs":1,"x":2039.000072479248,"y":3652.6664085388184,"z":"4e44f4dc.d3fbac","wires":[["689950a3.df60a"]]},{"id":"689950a3.df60a","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2194.2141647338867,"y":3653.4432859420776,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"3bfc9f47.c3df5","type":"outcome","name":"Pending Create","xml":"<outcome value='Pending Create'>\n","comments":"","outputs":1,"x":2041.000072479248,"y":3609.3329124450684,"z":"4e44f4dc.d3fbac","wires":[["ea88d2ba.493d6"]]},{"id":"ea88d2ba.493d6","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2194.2141647338867,"y":3610.1097898483276,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"1dbdf0e3.6d4c4f","type":"outcome","name":"PendingCreate","xml":"<outcome value='PendingCreate'>\n","comments":"","outputs":1,"x":2041.000072479248,"y":3565.9996604919434,"z":"4e44f4dc.d3fbac","wires":[["8104066e.259008"]]},{"id":"8104066e.259008","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2194.2141647338867,"y":3566.7765378952026,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"fe91b2bf.8c099","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":1727.3810997009277,"y":3986.7138295173645,"z":"4e44f4dc.d3fbac","wires":[["b10f2375.b9afa"]]},{"id":"53c17453.f0880c","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":1716.047664642334,"y":4031.7139115333557,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"438000d4.31b1e","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.cloud-region.availability-zones.availability-zone_length`' />\n","comments":"","x":554.6668395996094,"y":4401.214692115784,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"6f6caf00.d957c","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":495.8333511352539,"y":2461.8334608078003,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"277ce9ee.277656","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":475.00010681152344,"y":4610.88045501709,"z":"4e44f4dc.d3fbac","wires":[["7a3c612.03fada","d92cf5a6.33b858"]]},{"id":"56e0bd4b.bd3f64","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":475.0001449584961,"y":4540.880937576294,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"58f81e72.df87b","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.1666946411133,"y":2413.5000038146973,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"719fd6d4.9a4d78","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":449.3335380554199,"y":4871.3570766448975,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"9263c515.503118","type":"returnFailure","name":"return failure","xml":"<return 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":1511.66695022583,"y":4477.547351837158,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"32a6aa28.4d7b46","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1211.0241508483887,"y":4434.500012397766,"z":"4e44f4dc.d3fbac","wires":[["672f3870.869518"]]},{"id":"22485f0b.22ad6","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1219.5955810546875,"y":4478.785725593567,"z":"4e44f4dc.d3fbac","wires":[["6e62ccc6.dc7f34"]]},{"id":"32930b6a.86e284","type":"returnFailure","name":"return failure","xml":"<return 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":1514.3575439453125,"y":4434.30955696106,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"3c4d390f.0ff276","type":"returnFailure","name":"return failure","xml":"<return 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":946.6668853759766,"y":4630.8808879852295,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"7a3c612.03fada","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":649.3574371337891,"y":4589.500050544739,"z":"4e44f4dc.d3fbac","wires":[["db6c1834.e91948"]]},{"id":"d92cf5a6.33b858","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":657.9288673400879,"y":4633.78576374054,"z":"4e44f4dc.d3fbac","wires":[["ec9973e.c6a799"]]},{"id":"7baf675.e9c2498","type":"returnFailure","name":"return failure","xml":"<return 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":949.357479095459,"y":4587.643093109131,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"1fd770ea.bfd8af","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":547.5000152587891,"y":2865.1666078567505,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"703de5d6.b6b11c","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":1312.8333129882812,"y":2986.5801916122437,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"ed1ad94c.99ecb8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1132.500015258789,"y":3033.24697971344,"z":"4e44f4dc.d3fbac","wires":[["703de5d6.b6b11c","98e2f8af.a2f578","62cd4dc6.bccf24"]]},{"id":"62cd4dc6.bccf24","type":"break","name":"break","xml":"<break>\n","comments":"","x":1282.4999771118164,"y":3076.580276489258,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"858bb9df.ef0b98","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":786.6667785644531,"y":4312.294808387756,"z":"4e44f4dc.d3fbac","wires":[["420bf10a.3f71f","e9021688.b099b8"]]},{"id":"e9021688.b099b8","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=\"`$prop.cloud-region.cloud-owner`\" />\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.cloud-region.availability-zones.availability-zone[$idx].availability-zone-name`\" />\n","comments":"","outputs":1,"x":1080.0001678466797,"y":4335.628262519836,"z":"4e44f4dc.d3fbac","wires":[["3a86920a.c74fce","85b44524.f59068"]]},{"id":"2639188b.f42278","type":"returnFailure","name":"return failure","xml":"<return 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":1637.1428298950195,"y":4359.547591209412,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"3a86920a.c74fce","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1344.8334197998047,"y":4316.500084877014,"z":"4e44f4dc.d3fbac","wires":[["c2464793.9ffc08"]]},{"id":"85b44524.f59068","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1353.4048500061035,"y":4360.785798072815,"z":"4e44f4dc.d3fbac","wires":[["9d10abef.aa9d68"]]},{"id":"2754abb3.b85874","type":"returnFailure","name":"return failure","xml":"<return 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":1639.833423614502,"y":4316.309796333313,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"cb783055.50a9a","type":"set","name":"set mapping rows to 0","xml":"<set>\n<parameter name='db.vf-network-role-mapping_length' value='0' />\n","comments":"","x":1106.3094863891602,"y":3279.437578201294,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"183d18f7.8083e7","type":"switchNode","name":"switch AAI availability-zone_length","xml":"<switch test='`$aai.cloud-region.availability-zones.availability-zone_length`'>\n","comments":"","outputs":1,"x":527.3810653686523,"y":4216.10439491272,"z":"4e44f4dc.d3fbac","wires":[["bd16fb24.0fe038"]]},{"id":"bd16fb24.0fe038","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":745.9524841308594,"y":4215.675804138184,"z":"4e44f4dc.d3fbac","wires":[["44f8e0c6.bf172"]]},{"id":"a4deaa00.e82908","type":"set","name":"set availability-zone_length to 0","xml":"<set>\n<parameter name='aai.cloud-region.availability-zones.availability-zone_length' value='0' />\n","comments":"","x":1347.3811264038086,"y":4234.2470417022705,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"44f8e0c6.bf172","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":934.5239562988281,"y":4216.104115962982,"z":"4e44f4dc.d3fbac","wires":[["d06ce29c.e7c56","91254f4.8fe1bb"]]},{"id":"d06ce29c.e7c56","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1137.3810634613037,"y":4190.389865875244,"z":"4e44f4dc.d3fbac","wires":[["2bf16ac7.c29516"]]},{"id":"91254f4.8fe1bb","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1138.809684753418,"y":4234.67561340332,"z":"4e44f4dc.d3fbac","wires":[["a4deaa00.e82908"]]},{"id":"66145063.39707","type":"returnFailure","name":"return failure","xml":"<return 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":1428.8095703125,"y":4188.437558174133,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"a0fc8588.9798e8","type":"execute","name":"execute PropertiesNode","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":495.95240020751953,"y":233.84224128723145,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"e8e240a8.b6802","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":712.6190414428711,"y":1863.2470073699951,"z":"4e44f4dc.d3fbac","wires":[["fda0d94d.246058"]]},{"id":"6ba58c99.3d6c54","type":"switchNode","name":"switch ecomp-naming","xml":"<switch test='`$db.vf-model.ecomp-generated-naming`'>\n","comments":"","outputs":1,"x":1090.2384300231934,"y":1763.961443901062,"z":"4e44f4dc.d3fbac","wires":[["6bc3ca08.30d814","1bd7e0e4.afcd3f","59311d10.015684"]]},{"id":"fda0d94d.246058","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":858.3335418701172,"y":1863.247124671936,"z":"4e44f4dc.d3fbac","wires":[["6ba58c99.3d6c54","68402099.cbb6e"]]},{"id":"1bd7e0e4.afcd3f","type":"outcome","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":1276.6668167114258,"y":1764.4375705718994,"z":"4e44f4dc.d3fbac","wires":[["8abd4d2f.9ce9"]]},{"id":"8abd4d2f.9ce9","type":"returnFailure","name":"return failure","xml":"<return 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":1430.9526023864746,"y":1783.009015083313,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"6bc3ca08.30d814","type":"outcome","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1276.6668090820312,"y":1723.0090246200562,"z":"4e44f4dc.d3fbac","wires":[["d6abe0cd.f17a7"]]},{"id":"59311d10.015684","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1276.6667556762695,"y":1807.2947025299072,"z":"4e44f4dc.d3fbac","wires":[["8abd4d2f.9ce9"]]},{"id":"d6abe0cd.f17a7","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1413.809726715088,"y":1723.151891708374,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"9b1fc0be.8fa7","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":697.8097686767578,"y":2217.866183280945,"z":"4e44f4dc.d3fbac","wires":[["68621ac1.29c734"]]},{"id":"68621ac1.29c734","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":863.5717315673828,"y":2216.7234535217285,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"e954ebf6.540d38","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":1748.643009185791,"y":1913.0089440345764,"z":"4e44f4dc.d3fbac","wires":[["e58cf0cd.381b5","7d1e3ef3.b14f9"]]},{"id":"e58cf0cd.381b5","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2025.7858123779297,"y":1886.5804772377014,"z":"4e44f4dc.d3fbac","wires":[["f78aa92e.072f88"]]},{"id":"7d1e3ef3.b14f9","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2030.5475578308105,"y":1931.9613881111145,"z":"4e44f4dc.d3fbac","wires":[["67192240.ef86fc"]]},{"id":"8e80323.5aec3d","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.action' value='ASSIGN' />\n<parameter name='generate-unique-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\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","comments":"","x":1703.6432609558105,"y":1864.1042637825012,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"67192240.ef86fc","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":2253.4519538879395,"y":1931.4374632835388,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"f78aa92e.072f88","type":"returnFailure","name":"return failure","xml":"<return 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":2179.3572731018066,"y":1886.0089869499207,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"68402099.cbb6e","type":"switchNode","name":"switch naming-policy","xml":"<switch test='`$db.vf-model.naming-policy`'>\n","comments":"","outputs":1,"x":1088.024013519287,"y":1972.2470607757568,"z":"4e44f4dc.d3fbac","wires":[["a1c920b0.57e32","54eaf052.a1d45"]]},{"id":"a1c920b0.57e32","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1278.0239448547363,"y":1893.675615310669,"z":"4e44f4dc.d3fbac","wires":[["bccad88.6a02328"]]},{"id":"54eaf052.a1d45","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1278.2621841430664,"y":2021.056559562683,"z":"4e44f4dc.d3fbac","wires":[["334f9686.9dd50a"]]},{"id":"bccad88.6a02328","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1430.8812141418457,"y":1892.2470817565918,"z":"4e44f4dc.d3fbac","wires":[["8e80323.5aec3d","e954ebf6.540d38"]]},{"id":"f9872f82.e6538","type":"call","name":"call GENERIC-RESOURCE-API:naming-policy-generate-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' >\n","comments":"","outputs":1,"x":1769.9291381835938,"y":2036.7709412574768,"z":"4e44f4dc.d3fbac","wires":[["63e66d57.ad35d4","47bb6c9e.5da7d4"]]},{"id":"334f9686.9dd50a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1432.786033630371,"y":2021.056559562683,"z":"4e44f4dc.d3fbac","wires":[["7ca84586.ce108c","f9872f82.e6538"]]},{"id":"7ca84586.ce108c","type":"set","name":"set variables for generating name","xml":"<set>\n<parameter name='naming-policy-generate-name-input.policy-instance-name' value='`$db.vf-model.naming-policy`' />\n<parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />\n<parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='naming-policy-generate-name-input.action' value='ASSIGN' />\n<parameter name='naming-policy-generate-name-input.query-parameter' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`' />","comments":"","x":1679.929054260254,"y":1991.05659532547,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"1c84fc68.b37734","type":"returnFailure","name":"return failure","xml":"<return 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 generate VNF name\" />\n","comments":"","x":2212.786087036133,"y":2010.6278791427612,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"7fa1a5bb.63414c","type":"set","name":"set tmp.vnf-name to generated name","xml":"<set>\n<parameter name='tmp.vnf-name' value='`$naming-policy-generate-name-output.vnf-name`' />\n","comments":"","x":2291.214656829834,"y":2055.3421812057495,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"159fe4a1.e3dfcb","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1802.6188735961914,"y":2735.746706008911,"z":"4e44f4dc.d3fbac","wires":[["10cd1a1d.c198e6","1a70e102.4df24f"]]},{"id":"1a70e102.4df24f","type":"call","name":"call GENERIC-RESOURCE-API:naming-policy-generate-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' >\n","comments":"","outputs":1,"x":2126.9045791625977,"y":2762.3182373046875,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"10cd1a1d.c198e6","type":"set","name":"set variables for deleting name","xml":"<set>\n<parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />\n<parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='naming-policy-generate-name-input.action' value='DELETE' />\n","comments":"","x":2028.3331985473633,"y":2715.175308227539,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"b587067c.c12fd8","type":"comment","name":"Unassign the VNF name","info":"","comments":"","x":1894.2855224609375,"y":2655.746808052063,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"e0c152ab.e7e04","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":914.2857818603516,"y":2922.4135060310364,"z":"4e44f4dc.d3fbac","wires":[["f16260c8.4591b","159fe4a1.e3dfcb"]]},{"id":"a42ab710.cce278","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":912.6190643310547,"y":2964.080258369446,"z":"4e44f4dc.d3fbac","wires":[["4676d832.85c178","159fe4a1.e3dfcb"]]},{"id":"b6ad7e13.cbdb8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":769.2857360839844,"y":3145.7468881607056,"z":"4e44f4dc.d3fbac","wires":[["f7a16dbf.78dcf","159fe4a1.e3dfcb"]]},{"id":"7f628377.de20fc","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1060.9524230957031,"y":3235.7468881607056,"z":"4e44f4dc.d3fbac","wires":[["7fcd46cd.478d88","159fe4a1.e3dfcb"]]},{"id":"85a5708b.39733","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1620.9524421691895,"y":3389.7467555999756,"z":"4e44f4dc.d3fbac","wires":[["b5a9325f.8e06e","159fe4a1.e3dfcb"]]},{"id":"22276dbf.92cb12","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1619.2857246398926,"y":3431.413507938385,"z":"4e44f4dc.d3fbac","wires":[["91d086d5.905598","159fe4a1.e3dfcb"]]},{"id":"2fba815e.79c32e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1562.619068145752,"y":3847.4135036468506,"z":"4e44f4dc.d3fbac","wires":[["6395a483.342b9c","159fe4a1.e3dfcb"]]},{"id":"2bf16ac7.c29516","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1272.6190872192383,"y":4189.080174446106,"z":"4e44f4dc.d3fbac","wires":[["66145063.39707","159fe4a1.e3dfcb"]]},{"id":"c2464793.9ffc08","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1492.6190872192383,"y":4317.080174446106,"z":"4e44f4dc.d3fbac","wires":[["2754abb3.b85874","159fe4a1.e3dfcb"]]},{"id":"9d10abef.aa9d68","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1490.9523696899414,"y":4360.746926784515,"z":"4e44f4dc.d3fbac","wires":[["2639188b.f42278","159fe4a1.e3dfcb"]]},{"id":"672f3870.869518","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1355.9524612426758,"y":4434.080174446106,"z":"4e44f4dc.d3fbac","wires":[["32930b6a.86e284","159fe4a1.e3dfcb"]]},{"id":"6e62ccc6.dc7f34","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1354.285743713379,"y":4477.746926784515,"z":"4e44f4dc.d3fbac","wires":[["9263c515.503118","159fe4a1.e3dfcb"]]},{"id":"db6c1834.e91948","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":802.6191215515137,"y":4589.080289840698,"z":"4e44f4dc.d3fbac","wires":[["7baf675.e9c2498","159fe4a1.e3dfcb"]]},{"id":"ec9973e.c6a799","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":800.9524040222168,"y":4632.747042179108,"z":"4e44f4dc.d3fbac","wires":[["3c4d390f.0ff276","159fe4a1.e3dfcb"]]},{"id":"63e66d57.ad35d4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2068.095184326172,"y":2011.6994485855103,"z":"4e44f4dc.d3fbac","wires":[["1c84fc68.b37734"]]},{"id":"47bb6c9e.5da7d4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2072.8569297790527,"y":2057.0803594589233,"z":"4e44f4dc.d3fbac","wires":[["7fa1a5bb.63414c"]]},{"id":"3e07f67c.a7124a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":723.3332824707031,"y":1366.666666984558,"z":"4e44f4dc.d3fbac","wires":[["baf35ab4.de3628","1a10c87.b7e5338"]]},{"id":"537d84c0.249e5c","type":"for","name":"for each instance group id","xml":"<for silentFailure='true' index='inst-group-index' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids_length`' >\n","comments":"","outputs":1,"x":506.66662979125977,"y":1367.333312034607,"z":"4e44f4dc.d3fbac","wires":[["3e07f67c.a7124a"]]},{"id":"baf35ab4.de3628","type":"get-resource","name":"get-resource instance-group","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"instance-group\" \n\t\tkey=\"instance-group.id = $vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids[$inst-group-index].vnf-network-instance-group-id\"\n pfx='aai.instance-group' local-only='false' >\n\n","comments":"","outputs":1,"x":954.6666412353516,"y":1290.0000486373901,"z":"4e44f4dc.d3fbac","wires":[["5a73dff4.a3a92","1cc3de9c.f21291"]]},{"id":"1cc3de9c.f21291","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1168.9128494262695,"y":1308.150897026062,"z":"4e44f4dc.d3fbac","wires":[["8ab060f.9d1f2a"]]},{"id":"5a73dff4.a3a92","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1177.8414459228516,"y":1266.4366302490234,"z":"4e44f4dc.d3fbac","wires":[["6cb384a2.611ddc"]]},{"id":"6cb384a2.611ddc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Cannot find instance group id ' +\n $vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids[$inst-group-index].vnf-network-instance-group-id\n + ' in AAI'`\" />\n","comments":"","x":1350.6666564941406,"y":1264.0000410079956,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"8ab060f.9d1f2a","type":"returnFailure","name":"return failure","xml":"<return 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 instance-group from AAI\" />\n","comments":"","x":1350.6666564941406,"y":1308.0000410079956,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"4cc45d68.737674","type":"execute","name":"printContext","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/bgb-vnf.log' />\n","comments":"","outputs":1,"x":485.8095016479492,"y":2334.2858095169067,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"1a10c87.b7e5338","type":"for","name":"for each relationship","xml":"<for index='rel-index' start='0' end='`$aai.instance-group.relationship-list.relationship_length`' >\n","comments":"","outputs":1,"x":928.3332977294922,"y":1438.3333644866943,"z":"4e44f4dc.d3fbac","wires":[["334e1afb.9c1a56"]]},{"id":"334e1afb.9c1a56","type":"switchNode","name":"switch related-to","xml":"<switch test='`$aai.instance-group.relationship-list.relationship[$rel-index].related-to`'>\n","comments":"","outputs":1,"x":1141.6667404174805,"y":1438.333303451538,"z":"4e44f4dc.d3fbac","wires":[["9ec622df.a4f79"]]},{"id":"9ec622df.a4f79","type":"outcome","name":"collection","xml":"<outcome value='collection'>\n","comments":"","outputs":1,"x":1313.3333778381348,"y":1438.3333854675293,"z":"4e44f4dc.d3fbac","wires":[["f0af7cfb.630f1"]]},{"id":"f0af7cfb.630f1","type":"get-resource","name":"get-resource collection","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"collection\" \n\t\tkey=\"collection.collection-id = $aai.instance-group.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value\"\n pfx='aai.collection' local-only='false' >\n\n","comments":"","outputs":1,"x":1533.3332824707031,"y":1436.6666469573975,"z":"4e44f4dc.d3fbac","wires":[["5a9a2b.446c05d4","ed35d4f2.f5a3d8","86f300a3.7cafb"]]},{"id":"ed35d4f2.f5a3d8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1747.579475402832,"y":1388.1508359909058,"z":"4e44f4dc.d3fbac","wires":[["58b0fdde.ff35b4"]]},{"id":"5a9a2b.446c05d4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1756.508071899414,"y":1346.4365692138672,"z":"4e44f4dc.d3fbac","wires":[["a61328d2.f754c8"]]},{"id":"a61328d2.f754c8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Cannot find collection ' +\n $aai.instance-group.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value\n + ' in AAI'`\" />\n","comments":"","x":1913.3332824707031,"y":1345.0000410079956,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"58b0fdde.ff35b4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"System error retrieving collection from AAI\" />\n","comments":"","x":1913.3332824707031,"y":1389.0000410079956,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"86f300a3.7cafb","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1746.6666831970215,"y":1525.000012397766,"z":"4e44f4dc.d3fbac","wires":[["81df8930.31e0f8"]]},{"id":"81df8930.31e0f8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1899.9998245239258,"y":1524.3333082199097,"z":"4e44f4dc.d3fbac","wires":[["8a522d26.71257","a4f68cb7.668a2","8d0504d7.cdc028","cc147160.20bfe","3198ae9f.e95542"]]},{"id":"8a522d26.71257","type":"for","name":"for each network-instance-group","xml":"<for silentFailure='true' index='nig-index' start='0' end='`$service-data.network-instance-groups.network-instance-group_length`' >\n","comments":"","outputs":1,"x":2138.333168029785,"y":1475.0000562667847,"z":"4e44f4dc.d3fbac","wires":[["9063a8ee.f7faa8"]]},{"id":"a4f68cb7.668a2","type":"set","name":"set found-network-instance-group to false","xml":"<set>\n<parameter name='found-network-instance-group' value='false' />\n","comments":"","x":2168.3331298828125,"y":1428.3334283828735,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"9063a8ee.f7faa8","type":"switchNode","name":"network-instance-group-id matches?","xml":"<switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids[$inst-group-index].vnf-network-instance-group-id\n == $service-data.network-instance-groups.network-instance-group[$nig-index].network-instance-group-id`'>\n","comments":"","outputs":1,"x":2454.9996795654297,"y":1475.0000553131104,"z":"4e44f4dc.d3fbac","wires":[["98d54f6d.c932"]]},{"id":"98d54f6d.c932","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2676.666458129883,"y":1475.0000200271606,"z":"4e44f4dc.d3fbac","wires":[["a9385545.8b31c8"]]},{"id":"a9385545.8b31c8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2806.666488647461,"y":1475.000096321106,"z":"4e44f4dc.d3fbac","wires":[["85ee6cee.1bd2a","a14aee8f.5893a"]]},{"id":"85ee6cee.1bd2a","type":"set","name":"set found-network-instance-group to true","xml":"<set>\n<parameter name='found-network-instance-group' value='true' />\n","comments":"","x":3039.9996643066406,"y":1446.6667213439941,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"a14aee8f.5893a","type":"break","name":"break","xml":"<break>\n","comments":"","x":2933.333278656006,"y":1495.0000915527344,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"8d0504d7.cdc028","type":"switchNode","name":"switch found-network-instance-group","xml":"<switch test='`$found-network-instance-group`'>\n","comments":"","outputs":1,"x":2149.999786376953,"y":1525.0000371932983,"z":"4e44f4dc.d3fbac","wires":[["9189bba.faf6f48"]]},{"id":"9189bba.faf6f48","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2371.666633605957,"y":1525.0000596046448,"z":"4e44f4dc.d3fbac","wires":[["520b2234.8e265c"]]},{"id":"520b2234.8e265c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Could not find network instance group ' +\n $vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids[$inst-group-index].vnf-network-instance-group-id\n + ' in MD-SAL'`\" />\n","comments":"","x":2518.333206176758,"y":1523.3333940505981,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"ed7dcd3d.7a64c","type":"set","name":"set tmp.vnf-network-collection_length to 0","xml":"<set>\n<parameter name='tmp.vnf-network-collection_length' value='0' />\n","comments":"","x":554.9999694824219,"y":1318.3334436416626,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"cc147160.20bfe","type":"set","name":"set vnf-network-collection data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$tmp.vnf-network-collection_length].network-instance-group-function'\n value='`$aai.instance-group.instance-group-function`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$tmp.vnf-network-collection_length].network-instance-group-id'\n value='`$aai.instance-group.id`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$tmp.vnf-network-collection_length].network-collection-service-instance-id'\n value='`$service-data.network-instance-groups.network-instance-group[$nig-index].service-instance-id`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$tmp.vnf-network-collection_length].network-collection-customization-uuid'\n value='`$aai.collection.collection-customization-id`' />\n","comments":"","x":2130.0001106262207,"y":1573.3333730697632,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"3198ae9f.e95542","type":"set","name":"increment tmp.vnf-network-collection_length","xml":"<set>\n<parameter name='tmp.vnf-network-collection_length' value='`$tmp.vnf-network-collection_length + 1`' />\n","comments":"","x":2171.666816711426,"y":1620.0000410079956,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"d4e45ae3.95e8e8","type":"set","name":"set vnf-network-collection_length","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection_length'\n value='`$tmp.vnf-network-collection_length`' />\n","comments":"","x":534.1666641235352,"y":1575.8333930969238,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"5602ea58.f558a4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":711.6667289733887,"y":4705.476315498352,"z":"4e44f4dc.d3fbac","wires":[["f145731.7dc939"]]},{"id":"569d159b.7974ac","type":"for","name":"for each instance group id","xml":"<for silentFailure='true' index='inst-group-index' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids_length`' >\n","comments":"","outputs":1,"x":495.0000762939453,"y":4706.142960548401,"z":"4e44f4dc.d3fbac","wires":[["5602ea58.f558a4"]]},{"id":"f145731.7dc939","type":"save","name":"save generic-vnf relationship to instance-group","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"generic-vnf:relationship-list\"\n key=\"generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-information.vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n <parameter name=\"relationship-list.relationship[0].related-to\" value=\"instance-group\" />\n <parameter name=\"relationship-list.relationship[0].related-link\"\n value=\"`'/aai/v$/network/instance-groups/instance-group/'\n + $vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids[$inst-group-index].vnf-network-instance-group-id`\" />\n","comments":"","outputs":1,"x":995.000057220459,"y":4704.999996185303,"z":"4e44f4dc.d3fbac","wires":[["aa364f8f.633a1","d50f251f.b38a38"]]},{"id":"2c0352e1.886b8e","type":"returnFailure","name":"return failure","xml":"<return 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":1551.6667289733887,"y":4723.333249092102,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"aa364f8f.633a1","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1254.3572807312012,"y":4681.952411651611,"z":"4e44f4dc.d3fbac","wires":[["b6ef2322.ecde1"]]},{"id":"d50f251f.b38a38","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1262.9287109375,"y":4726.238124847412,"z":"4e44f4dc.d3fbac","wires":[["c25bd07f.ba3dc"]]},{"id":"39611e1d.841192","type":"returnFailure","name":"return failure","xml":"<return 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 relationship in generic-vnf in AAI\" />\n","comments":"","x":1554.3573303222656,"y":4680.095512390137,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"b6ef2322.ecde1","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1407.6189651489258,"y":4681.532650947571,"z":"4e44f4dc.d3fbac","wires":[["39611e1d.841192","159fe4a1.e3dfcb"]]},{"id":"c25bd07f.ba3dc","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1405.952247619629,"y":4725.19940328598,"z":"4e44f4dc.d3fbac","wires":[["2c0352e1.886b8e","159fe4a1.e3dfcb"]]},{"id":"ccd49d85.073d1","type":"switchNode","name":"switch subnet_length","xml":"<switch test='`$aai.l3-network.l3-network[0].subnets.subnet_length`'>\n","comments":"","outputs":1,"x":1263.5714988708496,"y":3968.095386505127,"z":"4e44f4dc.d3fbac","wires":[["13f8461f.02754a","4f0f1832.9d6238","4a7eee29.bdad1"]]},{"id":"13f8461f.02754a","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1436.4286613464355,"y":3930.9524459838867,"z":"4e44f4dc.d3fbac","wires":[["d7fec3a.cf03e4"]]},{"id":"4f0f1832.9d6238","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":1437.8572311401367,"y":3969.523609161377,"z":"4e44f4dc.d3fbac","wires":[["d7fec3a.cf03e4"]]},{"id":"4a7eee29.bdad1","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1436.428695678711,"y":4008.095001220703,"z":"4e44f4dc.d3fbac","wires":[["7e5c1302.e8982c"]]},{"id":"7e5c1302.e8982c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1557.857250213623,"y":4008.0952682495117,"z":"4e44f4dc.d3fbac","wires":[["fe91b2bf.8c099","53c17453.f0880c"]]},{"id":"d7fec3a.cf03e4","type":"set","name":"set subnet_length to 0","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='0' />\n","comments":"","x":1629.2858543395996,"y":3939.523609161377,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"6d2f55b8.a2759c","type":"switchNode","name":"switch: sdnc-model-name && sdnc-artifact-name != null","xml":"<switch test=\"`$db.vf-model.sdnc-model-name != '' and $db.vf-model.sdnc-artifact-name != ''`\">","comments":"","outputs":1,"x":1539.8175621032715,"y":949.9999332427979,"z":"4e44f4dc.d3fbac","wires":[["6dd97b97.b67924","7c6a046e.7cc64c"]]},{"id":"6dd97b97.b67924","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1842.8889503479004,"y":922.6785984039307,"z":"4e44f4dc.d3fbac","wires":[["5b2ce020.a36b2"]]},{"id":"86ca6d15.0e146","type":"switchNode","name":"switch: param[].name","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$p].name`\">\n","comments":"","outputs":1,"x":1053.9484024047852,"y":598.2024068832397,"z":"4e44f4dc.d3fbac","wires":[["af0da8d9.d8ece8","6b384f33.32a78"]]},{"id":"63f83908.751498","type":"for","name":"for p in vnf-input-parameters,param[]","xml":"<for silentFailure='true' index='p' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`' >\n","comments":"","outputs":1,"x":760.055549621582,"y":598.7024393081665,"z":"4e44f4dc.d3fbac","wires":[["86ca6d15.0e146"]]},{"id":"e3aa680f.7c2008","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1250.2581176757812,"y":949.9521970748901,"z":"4e44f4dc.d3fbac","wires":[["6d2f55b8.a2759c"]]},{"id":"542091af.e959d","type":"call","name":"call self-serve-vnf-assign","xml":"<call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-assign' mode='sync' >\n","comments":"","outputs":1,"x":2132.257625579834,"y":717.845365524292,"z":"4e44f4dc.d3fbac","wires":[["a34d6a59.d39c18"]]},{"id":"ecba7f02.a0e2c","type":"returnFailure","name":"return failure","xml":"<return 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 self-serve assignment for vnf with vnf-id=' + $vnf-topology-operation-input.vnf-information.vnf-id`\" />\n","comments":"","x":2516.329002380371,"y":717.8453159332275,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"7c6a046e.7cc64c","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1845.78169631958,"y":979.2856025695801,"z":"4e44f4dc.d3fbac","wires":[["ae713fba.3df7f"]]},{"id":"84263c0c.96c43","type":"set","name":"set tmp.exist.sdnc-artifact-name = true","xml":"<set>\n<parameter name='tmp.exist.sdnc-artifact-name' value='true' />","comments":"","x":1595.8413314819336,"y":648.0595769882202,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"ae12ffc.41b2a","type":"set","name":"set tmp.exist.sdnc-model-name = true","xml":"<set>\n<parameter name='tmp.exist.sdnc-model-name' value='true' />\n","comments":"","x":1592.5554389953613,"y":598.0595922470093,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"3f17b073.bbbcb","type":"switchNode","name":"switch: tmp.exist.sdnc-model-name && tmp.exist.sdnc-artifact-name == true","xml":"<switch test=\"`$tmp.exist.sdnc-model-name == 'true' and $tmp.exist.sdnc-artifact-name == 'true'`\">\n","comments":"","outputs":1,"x":877.9960327148438,"y":767.0237197875977,"z":"4e44f4dc.d3fbac","wires":[["d1f392c4.1dab8","e3aa680f.7c2008"]]},{"id":"d1f392c4.1dab8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1246.5079917907715,"y":719.1427278518677,"z":"4e44f4dc.d3fbac","wires":[["5b2ce020.a36b2"]]},{"id":"cd40e494.6d16b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":453.65077209472656,"y":500.8691177368164,"z":"4e44f4dc.d3fbac","wires":[["63f83908.751498","3f17b073.bbbcb","e38b7cc3.75e77","806e0f23.0111b"]]},{"id":"d5dac1e.b0d824","type":"comment","name":"SELF-SERVE FORK","info":"","comments":"","x":442.2221984863281,"y":624.6786069869995,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"af0da8d9.d8ece8","type":"outcome","name":"sdnc_model_name","xml":"<outcome value='sdnc_model_name'>\n","comments":"","outputs":1,"x":1310.1269781930105,"y":598.1072013037544,"z":"4e44f4dc.d3fbac","wires":[["ae12ffc.41b2a"]]},{"id":"6b384f33.32a78","type":"outcome","name":"sdnc_artifact_name","xml":"<outcome value='sdnc_artifact_name'>\n","comments":"","outputs":1,"x":1312.9841003417969,"y":647.5357732772827,"z":"4e44f4dc.d3fbac","wires":[["84263c0c.96c43"]]},{"id":"a34d6a59.d39c18","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2337.555206298828,"y":717.3333969116211,"z":"4e44f4dc.d3fbac","wires":[["ecba7f02.a0e2c"]]},{"id":"11bf25d2.bdb8da","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":233.4126968383789,"y":234.2857322692871,"z":"4e44f4dc.d3fbac","wires":[["a0fc8588.9798e8","b32ac93e.aaa508","3e444c8d.9a16f4","cd40e494.6d16b8"]]},{"id":"b10f2375.b9afa","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1899.047706604004,"y":3986.6994638442993,"z":"4e44f4dc.d3fbac","wires":[["5bcbda97.98c4e4","3b85bc8c.02f794","e6ea74fb.9af718","f638c11c.6fd0e"]]},{"id":"cdefc051.a04bf","type":"set","name":"clear aai.l3-network","xml":"<set>\n<parameter name='aai.l3-network.' value='' />\n","comments":"","x":1257.6191520690918,"y":3359.5565824508667,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"6f9b0a93.f694a4","type":"break","name":"break","xml":"<break>\n","comments":"","x":3699.3330879211426,"y":3886.699146270752,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"be0cee42.5ab7e","type":"set","name":"set found-network to false","xml":"<set>\n<parameter name='found-network' value='false' />\n","comments":"","x":1399.047679901123,"y":3592.413550376892,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"46c88819.e15b38","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2370.7619857788086,"y":3746.6993465423584,"z":"4e44f4dc.d3fbac","wires":[["9833efbf.69304","5f2e36ac.da9228"]]},{"id":"5f2e36ac.da9228","type":"switchNode","name":"switch found-network","xml":"<switch test='`$found-network`'>\n","comments":"","outputs":1,"x":2562.190532684326,"y":3776.6994009017944,"z":"4e44f4dc.d3fbac","wires":[["66e2cd5f.2e0f04"]]},{"id":"2a1ad752.bfcd38","type":"set","name":"set found-network to true","xml":"<set>\n<parameter name='found-network' value='true' />\n","comments":"","x":3755.047966003418,"y":3840.984827041626,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"66e2cd5f.2e0f04","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2730.7620239257812,"y":3776.699330329895,"z":"4e44f4dc.d3fbac","wires":[["10d190b5.dcecdf"]]},{"id":"10d190b5.dcecdf","type":"break","name":"break","xml":"<break>\n","comments":"","x":2860.762092590332,"y":3775.27072429657,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"45b722b6.db776c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1571.0477027893066,"y":3720.4136247634888,"z":"4e44f4dc.d3fbac","wires":[["2b805935.a35cb6","c7e830d3.e9283"]]},{"id":"c7e830d3.e9283","type":"switchNode","name":"switch found-network","xml":"<switch test='`$found-network`'>\n","comments":"","outputs":1,"x":1781.0476570129395,"y":3792.413508415222,"z":"4e44f4dc.d3fbac","wires":[["24156eb7.6d1de2"]]},{"id":"24156eb7.6d1de2","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1949.6191482543945,"y":3792.4134378433228,"z":"4e44f4dc.d3fbac","wires":[["25a3a86e.400be8"]]},{"id":"25a3a86e.400be8","type":"break","name":"break","xml":"<break>\n","comments":"","x":2079.6192169189453,"y":3790.9848318099976,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"e38b7cc3.75e77","type":"set","name":"initialize tmp.exist.sdnc-model-name && tmp.exist.sdnc-artifact-name = false","xml":"<set>\n<parameter name='tmp.exist.sdnc-model-name' value='false' />\n<parameter name='tmp.exist.sdnc-artifact-name' value='false' />","comments":"","x":880.1429061889648,"y":501.33330821990967,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"fb1b0696.2b0118","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":2098.666561126709,"y":879.9999332427979,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"893e0d25.a86ef","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":2188.480007171631,"y":782.3374137878418,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"f4cb36d0.800108","type":"execute","name":"printContext","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/ss-vnfend.log' />\n","comments":"","outputs":1,"x":2093.5712890625,"y":828.7771825790405,"z":"4e44f4dc.d3fbac","wires":[[]]},{"id":"5b2ce020.a36b2","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1899.6664695739746,"y":718.3333206176758,"z":"4e44f4dc.d3fbac","wires":[["542091af.e959d","893e0d25.a86ef","f4cb36d0.800108","fb1b0696.2b0118"]]},{"id":"e6ea74fb.9af718","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='`$tmp.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].neutron-subnet-id`' />\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].sdnc-subnet-id'\n value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-id`' />\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-role'\n value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-role`' />\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-name'\n value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-name`' />\n","comments":"","x":2053.3334732055664,"y":4017.3812103271484,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"f638c11c.6fd0e","type":"switchNode","name":"switch dhcp-enabled","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].dhcp-enabled`'>\n","comments":"","outputs":1,"x":2067.8572540283203,"y":4070.2241640090942,"z":"4e44f4dc.d3fbac","wires":[["1616a214.4d52fe","6cb55598.b5519c"]]},{"id":"1616a214.4d52fe","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2230.714418683733,"y":4048.795521736145,"z":"4e44f4dc.d3fbac","wires":[["9228e480.6386e8"]]},{"id":"6cb55598.b5519c","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2229.2857513427734,"y":4094.5099477767944,"z":"4e44f4dc.d3fbac","wires":[["10fd862a.7096da"]]},{"id":"9228e480.6386e8","type":"set","name":"set dhcp-enabled to Y","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].dhcp-enabled'\n value='Y' />\n","comments":"","x":2403.571617126465,"y":4047.3669176101685,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"10fd862a.7096da","type":"set","name":"set dhcp-enabled to N","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].dhcp-enabled'\n value='N' />\n","comments":"","x":2400.714385986328,"y":4094.5099477767944,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"5bcbda97.98c4e4","type":"switchNode","name":"switch subnet-role","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-role`'>\n","comments":"","outputs":1,"x":2068.333423614502,"y":3899.2718362808228,"z":"4e44f4dc.d3fbac","wires":[["2f3e4a5d.7c3b36"]]},{"id":"2f3e4a5d.7c3b36","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2235.000026702881,"y":3899.2714881896973,"z":"4e44f4dc.d3fbac","wires":[["24afcaa5.1defa6"]]},{"id":"24afcaa5.1defa6","type":"set","name":"set subnet-role to NONE","xml":"<set>\n<parameter name='aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-role' value='NONE' />\n","comments":"","x":2416.6668128967285,"y":3898.605140686035,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"3b85bc8c.02f794","type":"switchNode","name":"switch ip-version","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].ip-version`'>\n","comments":"","outputs":1,"x":2063.5717582702637,"y":3963.762942314148,"z":"4e44f4dc.d3fbac","wires":[["1c2233e9.20214c","e680d1ed.d7f9c"]]},{"id":"1c2233e9.20214c","type":"outcome","name":"4","xml":"<outcome value='4'>\n","comments":"","outputs":1,"x":2229.285900115967,"y":3945.191339492798,"z":"4e44f4dc.d3fbac","wires":[["f01b1452.dd9f88"]]},{"id":"e680d1ed.d7f9c","type":"outcome","name":"6","xml":"<outcome value='6'>\n","comments":"","outputs":1,"x":2229.285861968994,"y":3986.6200828552246,"z":"4e44f4dc.d3fbac","wires":[["319040e.ea0d5c"]]},{"id":"f01b1452.dd9f88","type":"set","name":"set tmp.ip-version to ipv4","xml":"<set>\n<parameter name='tmp.ip-version' value='ipv4' />\n","comments":"","x":2416.428665161133,"y":3944.3342666625977,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"319040e.ea0d5c","type":"set","name":"set tmp.ip-version to ipv6","xml":"<set>\n<parameter name='tmp.ip-version' value='ipv6' />\n","comments":"","x":2415.000217437744,"y":3986.6200847625732,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"806e0f23.0111b","type":"switchNode","name":"switch: vnf-input-parameters.param_length","xml":"<switch test=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`\">\n","comments":"","outputs":1,"x":778.5714645385742,"y":547.1428127288818,"z":"4e44f4dc.d3fbac","wires":[["f780fd19.5435b"]]},{"id":"f780fd19.5435b","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1042.1428833007812,"y":547.4285526275635,"z":"4e44f4dc.d3fbac","wires":[["7fdf9810.65be18"]]},{"id":"7fdf9810.65be18","type":"set","name":"set vnf-input-parameters.param_length = 0","xml":"<set>\n<parameter name='vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length' value='0' />\n","comments":"","x":1315.8571243286133,"y":547.2857141494751,"z":"4e44f4dc.d3fbac","wires":[]},{"id":"ed4c9615.d61838","type":"switchNode","name":"switch network-role","xml":"<switch test='`$db.vf-network-role-mapping[$role-index].network-role`'>\n","comments":"","outputs":1,"x":719.9999656677246,"y":3700.0000677108765,"z":"4e44f4dc.d3fbac","wires":[["43bb48c2.19f5b8","be93f82a.71aa68"]]},{"id":"43bb48c2.19f5b8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":886.666561126709,"y":3668.333317756653,"z":"4e44f4dc.d3fbac","wires":[["1443f6c4.ddb499"]]},{"id":"be93f82a.71aa68","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":886.6666069030762,"y":3726.666666984558,"z":"4e44f4dc.d3fbac","wires":[["7b16dda0.235334"]]},{"id":"1443f6c4.ddb499","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1018.3333129882812,"y":3666.66650390625,"z":"4e44f4dc.d3fbac","wires":[[]]}] \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_api-contrail-route-topology-operation-delete.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_api-contrail-route-topology-operation-delete.xml
index f0dacbed..d1ef588f 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_api-contrail-route-topology-operation-delete.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_api-contrail-route-topology-operation-delete.xml
@@ -80,7 +80,7 @@
</outcome>
</get-resource>
<for silentFailure='true' index='ridx' start='0' end="`$aai.ar.relationship-list.relationship_length`" >
- <for silentFailure='false' index='rdidx' start='0' end="`$aai.cloud-region.relationship-list.relationship[$ridx].relationship-data_length`" >
+ <for silentFailure='false' index='rdidx' start='0' end="`$aai.ar.relationship-list.relationship[$ridx].relationship-data_length`" >
<switch test='`$aai.ar.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-key`'>
<outcome value='configuration.configuration-id'>
<block atomic="true">
@@ -197,7 +197,7 @@
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="Failed to create policy in Contrail" />
+ <parameter name="error-message" value="Failed to delete policy in Contrail" />
</return>
</outcome>
</execute>
@@ -208,14 +208,14 @@
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="Failed to save network policy in AAI" />
+ <parameter name="error-message" value="Failed to delete network policy in AAI" />
</return>
</outcome>
<outcome value='not-found'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="Failed to save network policy in AAI" />
+ <parameter name="error-message" value="Failed to delete network policy in AAI" />
</return>
</outcome>
</delete>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_getpathsegment-create-composite-path.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_getpathsegment-create-composite-path.xml
index a09b03cb..76b8df45 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_getpathsegment-create-composite-path.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_getpathsegment-create-composite-path.xml
@@ -55,7 +55,7 @@
<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
key='select sm.invariant_uuid
from SERVICE_PROXY sp, SERVICE_MODEL sm
- where sp.parent_service_uuid = sm.service_uuid
+ where sp.source_service_uuid = sm.service_uuid
and sp.customization_uuid = $serv-cust[$serv-index].id'
pfx='db'>
<outcome value='failure'>
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 232d0c51..9f60d4bf 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
@@ -532,223 +532,230 @@
<parameter name='network-index' value='0' />
</set>
<for index='role-index' start='0' end='`$db.vf-network-role-mapping_length`'>
- <block atomic="true">
- <set>
- <parameter name='aai.l3-network.' value='' />
- </set>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <switch test='`$db.vf-network-role-mapping[$role-index].network-role`'>
+ <outcome value=''>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <set>
+ <parameter name='aai.l3-network.' value='' />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-networks"
key="l3-network.network-role = $db.vf-network-role-mapping[$role-index].network-role"
pfx='aai.l3-network' local-only='false'
>
- <outcome value='not-found'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No active l3-network found in AAI with cloud_region_id '
+ <outcome value='not-found'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No active l3-network found in AAI with cloud_region_id '
+ $vnf-topology-operation-input.vnf-request-input.aic-cloud-region + ' and network_role '
+ $db.vf-network-role-mapping[$network-index].network-role`" />
- </return>
- </block>
- </outcome>
- <outcome value='failure'>
+ </return>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error retrieving l3-network from AAI" />
+ </return>
+ </block>
+ </outcome>
+ </get-resource>
+ <set>
+ <parameter name='l3-network-id' value='-1' />
+ </set>
<block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error retrieving l3-network from AAI" />
- </return>
- </block>
- </outcome>
- </get-resource>
- <set>
- <parameter name='l3-network-id' value='-1' />
- </set>
- <block>
- <set>
- <parameter name='found-network' value='false' />
- </set>
- <for index='db-network-index' start='0' end='`$aai.l3-network.l3-network_length`' >
- <block atomic="true">
- <switch test='`$aai.l3-network.l3-network[$db-network-index].orchestration-status`'>
- <outcome value='PendingCreate'>
- <block></block>
- </outcome>
- <outcome value='Pending Create'>
- <block></block>
- </outcome>
- <outcome value='PendingDelete'>
- <block></block>
- </outcome>
- <outcome value='Pending Delete'>
- <block></block>
- </outcome>
- <outcome value='Other'>
- <for silentFailure='true' index='db-rel-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship_length`' >
- <block atomic="true">
- <switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].related-to`'>
- <outcome value='cloud-region'>
- <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`' >
- <switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-key`'>
- <outcome value='cloud-region.cloud-region-id'>
- <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`'>
- <outcome value='true'>
- <block atomic="true">
- <set>
- <parameter name='l3-network-id' value='`$aai.l3-network.l3-network[$db-network-index].network-id`' />
- </set>
- <set>
- <parameter name='found-network' value='true' />
- </set>
- <break/>
- </block>
+ <set>
+ <parameter name='found-network' value='false' />
+ </set>
+ <for index='db-network-index' start='0' end='`$aai.l3-network.l3-network_length`' >
+ <block atomic="true">
+ <switch test='`$aai.l3-network.l3-network[$db-network-index].orchestration-status`'>
+ <outcome value='PendingCreate'>
+ <block></block>
+ </outcome>
+ <outcome value='Pending Create'>
+ <block></block>
+ </outcome>
+ <outcome value='PendingDelete'>
+ <block></block>
+ </outcome>
+ <outcome value='Pending Delete'>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <for silentFailure='true' index='db-rel-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship_length`' >
+ <block atomic="true">
+ <switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].related-to`'>
+ <outcome value='cloud-region'>
+ <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`' >
+ <switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-key`'>
+ <outcome value='cloud-region.cloud-region-id'>
+ <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`'>
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='l3-network-id' value='`$aai.l3-network.l3-network[$db-network-index].network-id`' />
+ </set>
+ <set>
+ <parameter name='found-network' value='true' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
</outcome>
</switch>
- </outcome>
- </switch>
- </for>
- </outcome>
- </switch>
- <switch test='`$found-network`'>
- <outcome value='true'>
- <break/>
- </outcome>
- </switch>
- </block>
- </for>
- </outcome>
- </switch>
- <switch test='`$found-network`'>
- <outcome value='true'>
- <break/>
- </outcome>
- </switch>
- </block>
- </for>
- </block>
- <switch test='`$l3-network-id`'>
- <outcome value='-1'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Unable to find l3-network in AAI for network role ' + $db.vf-network-role-mapping[$role-index].network-role`" />
- </return>
+ </for>
+ </outcome>
+ </switch>
+ <switch test='`$found-network`'>
+ <outcome value='true'>
+ <break/>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </outcome>
+ </switch>
+ <switch test='`$found-network`'>
+ <outcome value='true'>
+ <break/>
+ </outcome>
+ </switch>
+ </block>
+ </for>
</block>
- </outcome>
- </switch>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-role'
+ <switch test='`$l3-network-id`'>
+ <outcome value='-1'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unable to find l3-network in AAI for network role ' + $db.vf-network-role-mapping[$role-index].network-role`" />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-role'
value='`$db.vf-network-role-mapping[$role-index].network-role`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-name'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-name'
value='`$aai.l3-network.l3-network[$db-network-index].network-name`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].neutron-id'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].neutron-id'
value='`$aai.l3-network.l3-network[$db-network-index].neutron-network-id`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-id'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-id'
value='`$aai.l3-network.l3-network[$db-network-index].network-id`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].contrail-network-fqdn'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].contrail-network-fqdn'
value='`$aai.l3-network.l3-network[$db-network-index].contrail-network-fqdn`' />
- </set>
- <switch test='`$aai.l3-network.l3-network[0].subnets.subnet_length`'>
- <outcome value=''>
- <set>
- <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'
- value='0' />
</set>
- </outcome>
- <outcome value='0'>
- <set>
- <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'
+ <switch test='`$aai.l3-network.l3-network[0].subnets.subnet_length`'>
+ <outcome value=''>
+ <set>
+ <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'
value='0' />
- </set>
- </outcome>
- <outcome value='Other'>
- <block>
- <for index='subnet-index' start='0' end='`$aai.l3-network.l3-network[0].subnets.subnet_length`' >
+ </set>
+ </outcome>
+ <outcome value='0'>
+ <set>
+ <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'
+ value='0' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
<block>
- <switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-role`'>
- <outcome value=''>
- <set>
- <parameter name='aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-role' value='NONE' />
- </set>
- </outcome>
- </switch>
- <switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].ip-version`'>
- <outcome value='4'>
- <set>
- <parameter name='tmp.ip-version' value='ipv4' />
- </set>
- </outcome>
- <outcome value='6'>
+ <for index='subnet-index' start='0' end='`$aai.l3-network.l3-network[0].subnets.subnet_length`' >
+ <block>
+ <switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-role`'>
+ <outcome value=''>
+ <set>
+ <parameter name='aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-role' value='NONE' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].ip-version`'>
+ <outcome value='4'>
+ <set>
+ <parameter name='tmp.ip-version' value='ipv4' />
+ </set>
+ </outcome>
+ <outcome value='6'>
+ <set>
+ <parameter name='tmp.ip-version' value='ipv6' />
+ </set>
+ </outcome>
+ </switch>
<set>
- <parameter name='tmp.ip-version' value='ipv6' />
- </set>
- </outcome>
- </switch>
- <set>
- <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'
+ <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'
value='`$tmp.ip-version`' />
- <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'
+ <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'
value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].neutron-subnet-id`' />
- <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].sdnc-subnet-id'
+ <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].sdnc-subnet-id'
value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-id`' />
- <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-role'
+ <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-role'
value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-role`' />
- <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-name'
+ <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-name'
value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-name`' />
- </set>
- <switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].dhcp-enabled`'>
- <outcome value='true'>
- <set>
- <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].dhcp-enabled'
- value='Y' />
</set>
- </outcome>
- <outcome value='false'>
- <set>
- <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].dhcp-enabled'
+ <switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].dhcp-enabled`'>
+ <outcome value='true'>
+ <set>
+ <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].dhcp-enabled'
+ value='Y' />
+ </set>
+ </outcome>
+ <outcome value='false'>
+ <set>
+ <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].dhcp-enabled'
value='N' />
- </set>
- </outcome>
- </switch>
- </block>
- </for>
- <set>
- <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'
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <set>
+ <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'
value='`$aai.l3-network.l3-network[0].subnets.subnet_length`' />
- </set>
- </block>
- </outcome>
- </switch>
- <set>
- <parameter name='network-index' value='`$network-index + 1`' />
- </set>
- </block>
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='network-index' value='`$network-index + 1`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
</for>
<set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length'