Chore: Add gerrit maven verify GHA workflow
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_api-contrail-route-topology-operation-delete.json
1 [{"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"]]}]