Merge "Remove test for Active on Delete"
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_api-contrail-route-topology-operation-delete.json
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"]]}]