aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_api-contrail-route-topology-operation-create.json
blob: d26c5be5ae2da6df8df8d80f610a29b80c837d3d (plain)
1
[{"id":"73e0c5c4.0e65fc","type":"dgstart","name":"DGSTART","outputs":1,"x":194.75,"y":111.75,"z":"fd8223be.2936e","wires":[["7f1aae85.46fc5"]]},{"id":"7f1aae85.46fc5","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":300.98807525634766,"y":190.45239543914795,"z":"fd8223be.2936e","wires":[["2dca365b.8949fa"]]},{"id":"2dca365b.8949fa","type":"method","name":"api-contrail-route-topology-operation-create","xml":"<method rpc='api-contrail-route-topology-operation-create' mode='sync'>\n","comments":"","outputs":1,"x":279.23817443847656,"y":287.60711765289307,"z":"fd8223be.2936e","wires":[["71de5a8a.06d68c"]]},{"id":"71de5a8a.06d68c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":329.2261848449707,"y":399.273784160614,"z":"fd8223be.2936e","wires":[["37d1d007.e441d","7599d396.fab11c","5487e8c6.2ce188","90603bb4.644bf","bcff5d22.739c18","973bba6f.6e0248","7a30a7f9.6e1ae8","6e678b74.303c34","84c0d39e.e63c5","c015b9b7.736d8","b57c7a1.51b0008","88bf8b92.12a5e","64edc8a3.a7d48","e60b2fce.554fe","e2f5e253.1b2318","6d7d1582.92029c","59f0019d.e27e5","8a4f8bfb.56fa78","416a3007.88306","803a97d9.066c3","724e650c.59b494","7f28e1e1.db86f8","b09a986c.221fa8","5172899d.b7464","e9d9ba39.43f818","3d247334.a1372c","f255c05d.7948a","7213d545.2b0f9c","37ded934.68fab6","4c419af6.dc942c","2e387eee.1a638a","c5de323f.f81938","7cae277d.772588","c3814cf0.0b0738","6c53e4ce.fecfe4","4a08ade2.d13b7c","910ed547.3ffca","948c94af.a879","dfa7d0a5.73fd4","326513f8.a01924","82250dcd.64764","2ed539df.fbd8ce","17c62791.e0bba","1e7787ad.0d68a8","778c350c.8dd8e4","672a2172.2f5058"]]},{"id":"7599d396.fab11c","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":582.0835952758789,"y":4812.631404876709,"z":"fd8223be.2936e","wires":[]},{"id":"37d1d007.e441d","type":"set","name":"set output to caller","xml":"<set>\n<parameter name='cto-api.contrail-route-allotted-instance-id' value='`$tmp.ar.allotted-resource-id`' />\n\n \n","comments":"","x":595.8374938964844,"y":4717.801609992981,"z":"fd8223be.2936e","wires":[]},{"id":"88bf8b92.12a5e","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Created' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":711.1708831787109,"y":3266.468216896057,"z":"fd8223be.2936e","wires":[]},{"id":"5487e8c6.2ce188","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/contrail-route-topology/'` \" />\n\n","comments":"","x":750.0121307373047,"y":1818.3691606521606,"z":"fd8223be.2936e","wires":[]},{"id":"90603bb4.644bf","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":818.9341888427734,"y":1861.9338998794556,"z":"fd8223be.2936e","wires":[[]]},{"id":"973bba6f.6e0248","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":802.1262435913086,"y":2133.828694343567,"z":"fd8223be.2936e","wires":[["ed128194.abfb6","db13b017.ab15b"]]},{"id":"bcff5d22.739c18","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$prop.restapi.cr-allottedresource`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n    <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":792.6722106933594,"y":1905.7197103500366,"z":"fd8223be.2936e","wires":[[]]},{"id":"ed128194.abfb6","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1191.0890617370605,"y":2131.9697785377502,"z":"fd8223be.2936e","wires":[["b5310c26.f565d8"]]},{"id":"c015b9b7.736d8","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.cr.templatefile`\" />\n    <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n    <parameter name='restapiUser' value='`$prop.controller.user`' />\n    <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='PUT' />\n    <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":676.0415382385254,"y":4578.041424751282,"z":"fd8223be.2936e","wires":[["852d43ca.478d68","dc3e6244.b22628","51fd5b3b.c2a0dc"]]},{"id":"852d43ca.478d68","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":943.0162200927734,"y":4609.373085021973,"z":"fd8223be.2936e","wires":[["c445da3e.4e161"]]},{"id":"dc3e6244.b22628","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":937.349609375,"y":4577.87292098999,"z":"fd8223be.2936e","wires":[["c445da3e.4e161"]]},{"id":"b87f121d.e891","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource.  Parent provided resource rolled back\" />\n","comments":"","x":1279.4329414367676,"y":4623.956533432007,"z":"fd8223be.2936e","wires":[]},{"id":"b5310c26.f565d8","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1320.0890464782715,"y":2128.8030405044556,"z":"fd8223be.2936e","wires":[["efb8d6d3.a0fa4"]]},{"id":"efb8d6d3.a0fa4","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1530.9462890625,"y":2128.4221696853638,"z":"fd8223be.2936e","wires":[["47489607.a87a28"]]},{"id":"47489607.a87a28","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1720.2795944213867,"y":2128.422127723694,"z":"fd8223be.2936e","wires":[["b6498b3f.f4a89"]]},{"id":"e07680f5.890c28","type":"comment","name":"Save consumed-allotted-resources to mdsal","info":"","comments":"","x":693.9935455322266,"y":3937.4700117111206,"z":"fd8223be.2936e","wires":[]},{"id":"d60bc376.6aa18","type":"comment","name":"GET contrail-route-allotted-resource from mdsal","info":"","comments":"","x":823.0888977050781,"y":2081.1362199783325,"z":"fd8223be.2936e","wires":[]},{"id":"7a30a7f9.6e1ae8","type":"set","name":"set ar-request-information","xml":"<set>\n<parameter name='ar-request-information.source' value=\"SDNC\" />\n\n\n","comments":"","x":775.9936828613281,"y":1644.3269243240356,"z":"fd8223be.2936e","wires":[]},{"id":"dd0f18a6.2957a8","type":"comment","name":"Set allotted-resource-identifiers","info":"","comments":"","x":766.6127777099609,"y":2243.0409364700317,"z":"fd8223be.2936e","wires":[]},{"id":"64edc8a3.a7d48","type":"set","name":"set identifiers in overal structure","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.allotted-resource-identifiers.' \nvalue=\"`$ar-identifiers.`\" />\n\n\n","comments":"","x":730.3745155334473,"y":2838.7555561065674,"z":"fd8223be.2936e","wires":[]},{"id":"644ccc60.4a1004","type":"set","name":"set ar_name","xml":"<set>\n<parameter name='tmp.ar-name' value='$source-network-name_$cloud-region-id_$source-network-role_$collector-network-role _policy_' />\n","comments":"","x":978.3746719360352,"y":2449.1364755630493,"z":"fd8223be.2936e","wires":[]},{"id":"207be70c.805438","type":"execute","name":"execute SliStringUtils - replace $source-network-name","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n    <parameter name=\"target\" value=\"$source-network-name\"/>\n    <parameter name=\"replacement\" value=\"`$ctotmp.s-l3-network.network-name`\"/>\n\n","comments":"","outputs":1,"x":1103.5179138183594,"y":2489.326988220215,"z":"fd8223be.2936e","wires":[[]]},{"id":"ca12d338.3af09","type":"execute","name":"execute SliStringUtils - replace collector-network-role","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n    <parameter name=\"target\" value=\"$collector-network-role\"/>\n    <parameter name=\"replacement\" value=\"`$cto-api.collector-network-role`\"/>\n\n","comments":"","outputs":1,"x":1091.8511505126953,"y":2588.4696521759033,"z":"fd8223be.2936e","wires":[[]]},{"id":"2ed539df.fbd8ce","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":708.0414085388184,"y":2449.8029142320156,"z":"fd8223be.2936e","wires":[["644ccc60.4a1004","207be70c.805438","ca12d338.3af09","264ea65f.c1daa2","43ac428a.dc5c34","3d9c9398.344a14","9e2a16a6.a13cb8","3f03ddb7.9a84f2","ce6205d7.9406b8"]]},{"id":"264ea65f.c1daa2","type":"set","name":"set identifiers.allotted-resource-name","xml":"<set>\n<parameter name='ar-identifiers.allotted-resource-name' value='`$tmp.ar-name`' />\n","comments":"","x":1043.0412788391113,"y":2736.7553153932095,"z":"fd8223be.2936e","wires":[]},{"id":"e60b2fce.554fe","type":"set","name":"set assignments in overal structure","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.' \nvalue=\"`$ar-assignments.`\" />\n\n\n","comments":"","x":705.9459533691406,"y":3481.0422582626343,"z":"fd8223be.2936e","wires":[]},{"id":"6d7d1582.92029c","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.source-network.network-id' value=\"`$ctotmp.s-l3-network.network-id` \" />\n<parameter name='ar-assignments.source-network.network-role' value=\"`$cto-api.source-network-role` \" />\n<parameter name='ar-assignments.dest-network.network-id' value=\"`$ctotmp.c-l3-network.network-id` \" />\n<parameter name='ar-assignments.dest-network.network-role' value=\"`$cto-api.collector-network-role` \" />\n\n\n","comments":"","x":686.755500793457,"y":2873.8030004501343,"z":"fd8223be.2936e","wires":[]},{"id":"9e272ec7.04769","type":"for","name":"for cidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]","xml":"<for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n","comments":"","outputs":1,"x":1573.5654296875,"y":4012.374701499939,"z":"fd8223be.2936e","wires":[["2a65ff.8d7fda02"]]},{"id":"6e678b74.303c34","type":"switchNode","name":"switch service-data.consumed-allotted-resources_length","xml":"<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n","comments":"","outputs":1,"x":741.5648803710938,"y":3970.0887699127197,"z":"fd8223be.2936e","wires":[["2ca2838e.661a44","674d770a.b887e"]]},{"id":"2ca2838e.661a44","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1053.707763671875,"y":3972.9461851119995,"z":"fd8223be.2936e","wires":[["5e15905d.5fd038"]]},{"id":"674d770a.b887e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1041.7077674865723,"y":4015.946186542511,"z":"fd8223be.2936e","wires":[["106d14da.f2f283"]]},{"id":"2a65ff.8d7fda02","type":"switchNode","name":"switch allotted-resource-id","xml":"<switch test=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n","comments":"","outputs":1,"x":2003.660629272461,"y":4014.43434381485,"z":"fd8223be.2936e","wires":[["f00c83a.815be"]]},{"id":"f00c83a.815be","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2208.4706268310547,"y":4014.898920059204,"z":"fd8223be.2936e","wires":[["23dd8766.297268"]]},{"id":"106d14da.f2f283","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1201.8348579406738,"y":4014.072163105011,"z":"fd8223be.2936e","wires":[["9e272ec7.04769","b4720284.921fa"]]},{"id":"23dd8766.297268","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2399.2314453125,"y":4014.7560930252075,"z":"fd8223be.2936e","wires":[["48b3fee5.6ccd8","d4e53b54.a15808"]]},{"id":"5e15905d.5fd038","type":"set","name":"set cidx","xml":"<set>\n<parameter name='tmp.cidx' value=\"`0`\" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value=\"1\" />\n\n\n","comments":"","x":1212.5647354125977,"y":3972.6602478027344,"z":"fd8223be.2936e","wires":[]},{"id":"48b3fee5.6ccd8","type":"set","name":"set tmp.cidx and ctx.consumed-ar","xml":"<set>\n<parameter name='tmp.cidx' value='`$cidx`' />\n<parameter name='ctx.consumed-ar.' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].`' />\n<parameter name='tmp.found-cidx' value='true' />","comments":"","x":2645.088876724243,"y":3971.994129180908,"z":"fd8223be.2936e","wires":[]},{"id":"84c0d39e.e63c5","type":"set","name":"set consumed allotted resources","xml":"<set>\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-type' value=\"`$tmp.ar.allotted-resource-type` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-pointer' value=\"`$tmp.ar.self-link` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$tmp.cidx + 1`' />\n\n","comments":"","x":665.4222869873047,"y":4010.6603050231934,"z":"fd8223be.2936e","wires":[]},{"id":"abf7f200.f83fc8","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":753.5650177001953,"y":1961.9933624267578,"z":"fd8223be.2936e","wires":[]},{"id":"b09a986c.221fa8","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.fq-name' value=\"`$tmp.fq-name` \" />\n\n\n\n","comments":"","x":680.0888290405273,"y":3091.9469709396362,"z":"fd8223be.2936e","wires":[]},{"id":"35bec61.b93bbba","type":"comment","name":"Add AR to md-sal","info":"","comments":"","x":597.3270835876465,"y":4550.89836025238,"z":"fd8223be.2936e","wires":[]},{"id":"b57c7a1.51b0008","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n    <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":666.6600646972656,"y":3227.2319765090942,"z":"fd8223be.2936e","wires":[[]]},{"id":"b6498b3f.f4a89","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Error: Existing contrail route allotted resource\" />\n    \n","comments":"","x":1900.6075477600098,"y":2126.369183063507,"z":"fd8223be.2936e","wires":[]},{"id":"db13b017.ab15b","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1187.940845489502,"y":2165.3692865371704,"z":"fd8223be.2936e","wires":[["c478d043.0bfbb"]]},{"id":"c478d043.0bfbb","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1322.9407958984375,"y":2166.0357751846313,"z":"fd8223be.2936e","wires":[[]]},{"id":"e2f5e253.1b2318","type":"set","name":"set ar data","xml":"<set>\n<parameter name='ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<!--\n<parameter name='ar.allotted-resource-status.action' value=\"`$contrail-route-topology-operation-input.request-information.request-action` \" />\n<parameter name='ar.allotted-resource-status.rpc-name' value=\"contrail-route-topology-operation\" />\n<parameter name='ar.allotted-resource-status.rpc-action' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$contrail-route-topology-operation-input.request-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$contrail-route-topology-operation-input.service-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.` \" />\n-->","comments":"","x":718.2740936279297,"y":2189.702548980713,"z":"fd8223be.2936e","wires":[]},{"id":"43ac428a.dc5c34","type":"execute","name":"execute SliStringUtils - replace $cloud-region-id","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n    <parameter name=\"target\" value=\"$cloud-region-id\"/>\n    <parameter name=\"replacement\" value=\"`$cto-api.cloud-region-id`\"/>\n\n","comments":"","outputs":1,"x":1081.8927841186523,"y":2521.7025747299194,"z":"fd8223be.2936e","wires":[[]]},{"id":"3d9c9398.344a14","type":"execute","name":"execute SliStringUtils - replace $source-network-role","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n    <parameter name=\"target\" value=\"$source-network-role\"/>\n    <parameter name=\"replacement\" value=\"`$cto-api.source-network-role`\"/>\n\n","comments":"","outputs":1,"x":1085.2736053466797,"y":2549.035895347595,"z":"fd8223be.2936e","wires":[[]]},{"id":"3f03ddb7.9a84f2","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":1101.6071472167969,"y":2696.3691416978836,"z":"fd8223be.2936e","wires":[["b548b1f6.a326a","2e1da622.231e42"]]},{"id":"b548b1f6.a326a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1436.321792602539,"y":2694.2263759970665,"z":"fd8223be.2936e","wires":[["ed374845.ee4bb"]]},{"id":"2e1da622.231e42","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1441.6550369262695,"y":2725.8930765092373,"z":"fd8223be.2936e","wires":[["5f3684b9.b9797c"]]},{"id":"9e2a16a6.a13cb8","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.index-table-name' value='CONTRAIL_ROUTE_NAME_INDEX' />\n<parameter name='generate-unique-name-input.index-table-prefix-column' value='contrail_route_name_prefix' />\n<parameter name='generate-unique-name-input.name-table-type' value='CONTRAIL_ROUTE_INSTANCE' />\n<parameter name='generate-unique-name-input.prefix' value=\"`$tmp.ar-name`\" />\n<parameter name='generate-unique-name-input.index-length' value='2' />\n","comments":"","x":1063.2741470336914,"y":2626.035841912031,"z":"fd8223be.2936e","wires":[]},{"id":"5f3684b9.b9797c","type":"set","name":"set tmp.ar-name to generated name","xml":"<set>\n<parameter name='tmp.ar-name' value='`$generate-unique-name-output.generated-name`' />\n","comments":"","x":1688.845199584961,"y":2726.3691568374634,"z":"fd8223be.2936e","wires":[]},{"id":"ed374845.ee4bb","type":"returnFailure","name":"return failure","xml":"<return 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":1610.1787147521973,"y":2693.6548896729946,"z":"fd8223be.2936e","wires":[]},{"id":"59f0019d.e27e5","type":"set","name":"set fq_name","xml":"<set>\n<parameter name='tmp.fq-name' value='$defaultDomain.$defaultProject.$sdncNetworkPolicy' />\n","comments":"","x":668.4166259765625,"y":2958.083620071411,"z":"fd8223be.2936e","wires":[]},{"id":"8a4f8bfb.56fa78","type":"execute","name":"execute SliStringUtils - replace $defaultDomain","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$tmp.fq-name`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.fq-name\"/>\n    <parameter name=\"target\" value=\"$defaultDomain\"/>\n    <parameter name=\"replacement\" value=\"`$cto-api.default-domain`\"/>\n\n","comments":"","outputs":1,"x":775.7500152587891,"y":2988.0835410654545,"z":"fd8223be.2936e","wires":[[]]},{"id":"416a3007.88306","type":"execute","name":"execute SliStringUtils - replace $defaultProject","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$tmp.fq-name`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.fq-name\"/>\n    <parameter name=\"target\" value=\"$defaultProject\"/>\n    <parameter name=\"replacement\" value=\"`$cto-api.default-project`\"/>\n\n","comments":"","outputs":1,"x":775.7500076293945,"y":3021.417103767395,"z":"fd8223be.2936e","wires":[[]]},{"id":"bd3fa69c.30dc4","type":"comment","name":"generate fqname","info":"","comments":"","x":677.4166717529297,"y":2931.416926383972,"z":"fd8223be.2936e","wires":[]},{"id":"803a97d9.066c3","type":"execute","name":"execute SliStringUtils - replace $sdncNetworkPolicy","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$tmp.fq-name`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.fq-name\"/>\n    <parameter name=\"target\" value=\"$sdncNetworkPolicy\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.ar-name`\"/>\n\n","comments":"","outputs":1,"x":786.7499618530273,"y":3054.749886661768,"z":"fd8223be.2936e","wires":[[]]},{"id":"724e650c.59b494","type":"update","name":"save AAI allotted-resource","xml":"<save 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 = $cto-api.service-type AND\n\t\t\tservice-instance.service-instance-id = $cto-api.parent-service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n        pfx='pfx' local-only='false' force='false'>\n    <parameter name=\"id\" value=\"`$tmp.ar.allotted-resource-id`\" />\n\t<parameter name=\"description\" value=\"`$tmp.ar.allotted-resource-type`\" />\n\t<parameter name=\"selflink\" value=\"`$tmp.ar.self-link`\" />\n\t<parameter name=\"operational-status\" value=\"out-of-service-path\" />\n\t<parameter name=\"order-status\" value=\"Created\" />","comments":"","outputs":1,"x":658.3690795898438,"y":3697.9887590408325,"z":"fd8223be.2936e","wires":[["1ded98d5.9cb767","26bf7392.67e7a4","e80c53f2.a704a"]]},{"id":"1ded98d5.9cb767","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":907.0357131958008,"y":3670.226936817169,"z":"fd8223be.2936e","wires":[["3b1f3b10.705a0c"]]},{"id":"26bf7392.67e7a4","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":912.345142364502,"y":3705.798354625702,"z":"fd8223be.2936e","wires":[["3b1f3b10.705a0c"]]},{"id":"ce6205d7.9406b8","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"tmp.ar-name=\"/>\n<parameter name=\"field3\" value=\"`$tmp.ar-name`\"/>\n<parameter name=\"field4\" value=\"generate-unique-name-input.prefix\" />\n<parameter name=\"field5\" value=\"`$generate-unique-name-input.prefix`\" />","comments":"","outputs":1,"x":954.4739456176758,"y":2661.0359387099743,"z":"fd8223be.2936e","wires":[[]]},{"id":"7f28e1e1.db86f8","type":"execute","name":"generate parent-network url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$prop.restapi.network`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.ar-parentnetwork-url\"/>\n    <parameter name=\"target\" value=\"{service-instance-id}\"/>\n    <parameter name=\"replacement\" value=\"`$cto-api.parent-service-instance-id`\"/>\n","comments":"","outputs":1,"x":768.2741546630859,"y":2034.7022666931152,"z":"fd8223be.2936e","wires":[[]]},{"id":"c3a420b2.5783a","type":"comment","name":"Update AAI AR","info":"","comments":"","x":614.6166381835938,"y":3656.417206287384,"z":"fd8223be.2936e","wires":[]},{"id":"5172899d.b7464","type":"execute","name":"execute RestApiCallNode - Update parent provided service AR","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`\" />\n    <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-url`' />\n    <parameter name='restapiUser' value='`$prop.controller.user`' />\n    <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='PUT' />\n    <parameter name=\"responsePrefix\" value=\"parent\" />\n\n","comments":"","outputs":1,"x":745.6167144775391,"y":4148.750764369965,"z":"fd8223be.2936e","wires":[["e59c42d5.79faf8","422ff4ec.a8a394","e613335b.7c4aa8"]]},{"id":"e59c42d5.79faf8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1066.2580795288086,"y":4197.08226108551,"z":"fd8223be.2936e","wires":[["10882401.6b38ec"]]},{"id":"422ff4ec.a8a394","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1058.9247817993164,"y":4162.249007701874,"z":"fd8223be.2936e","wires":[["10882401.6b38ec"]]},{"id":"e613335b.7c4aa8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1062.674819946289,"y":4132.606112577021,"z":"fd8223be.2936e","wires":[["60a1a7d3.34c4b8"]]},{"id":"60a1a7d3.34c4b8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1204.3307876586914,"y":4128.798281766474,"z":"fd8223be.2936e","wires":[[]]},{"id":"f83ef61.b139408","type":"comment","name":"Put the parent allotted resource in mdsal","info":"","comments":"","x":672.6166801452637,"y":4116.750589847565,"z":"fd8223be.2936e","wires":[]},{"id":"b4720284.921fa","type":"switchNode","name":"switch tmp.found-cidx","xml":"<switch test='`$tmp.found-cidx`'>\n","comments":"","outputs":1,"x":1390.9499244689941,"y":4077.7504601478577,"z":"fd8223be.2936e","wires":[["970f80eb.52fe4"]]},{"id":"970f80eb.52fe4","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1580.949878692627,"y":4077.750397205353,"z":"fd8223be.2936e","wires":[["b15e15ed.cb123"]]},{"id":"b15e15ed.cb123","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1746.949878692627,"y":4077.750397205353,"z":"fd8223be.2936e","wires":[["7f6380dc.838d4"]]},{"id":"7f6380dc.838d4","type":"set","name":"set tmp.cidx ","xml":"<set>\n<parameter name='tmp.cidx' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' />\n","comments":"","x":1992.807207107544,"y":4078.32187128067,"z":"fd8223be.2936e","wires":[]},{"id":"d4e53b54.a15808","type":"break","name":"break","xml":"<break>\n","comments":"","x":2561.9498291015625,"y":4000.7501294612885,"z":"fd8223be.2936e","wires":[]},{"id":"e9d9ba39.43f818","type":"execute","name":"generate parent-ar url - replace service-instance-id","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$prop.restapi.parent-provided-resource`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.parent-ar-url\"/>\n    <parameter name=\"target\" value=\"{service-instance-id}\"/>\n    <parameter name=\"replacement\" value=\"`$cto-api.parent-service-instance-id`\"/>\n","comments":"","outputs":1,"x":841.140869140625,"y":1993.369249343872,"z":"fd8223be.2936e","wires":[[]]},{"id":"3d247334.a1372c","type":"execute","name":"generate parent-ar url - replace allotted-resource-id","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$tmp.parent-ar-url`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.parent-ar-url\"/>\n    <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":829.4740142822266,"y":2278.369143486023,"z":"fd8223be.2936e","wires":[[]]},{"id":"2f969250.766e46","type":"execute","name":"execute RestApiCallNode - Update parent provided service AR","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`\" />\n    <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-url`' />\n    <parameter name='restapiUser' value='`$prop.controller.user`' />\n    <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='DELETE' />\n    <parameter name=\"responsePrefix\" value=\"parent\" />\n\n","comments":"","outputs":1,"x":1436.4169578552246,"y":4589.750328063965,"z":"fd8223be.2936e","wires":[["cacefbda.c09118","a4a8e124.abfb98","a90079c7.306d8"]]},{"id":"48cc2493.a0fe6c","type":"comment","name":"Rollback parent","info":"","comments":"","x":1280.4168853759766,"y":4559.41695857048,"z":"fd8223be.2936e","wires":[]},{"id":"c445da3e.4e161","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1089.0834884643555,"y":4589.083631515503,"z":"fd8223be.2936e","wires":[["2f969250.766e46","76e9e56c.5f957c"]]},{"id":"cacefbda.c09118","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1807.7250061035156,"y":4650.415294408798,"z":"fd8223be.2936e","wires":[["772f3e20.3729e8"]]},{"id":"a4a8e124.abfb98","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1798.72505569458,"y":4618.915320158005,"z":"fd8223be.2936e","wires":[["772f3e20.3729e8"]]},{"id":"a90079c7.306d8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1802.4750938415527,"y":4589.272425033152,"z":"fd8223be.2936e","wires":[["772f3e20.3729e8"]]},{"id":"772f3e20.3729e8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1944.131061553955,"y":4585.464594222605,"z":"fd8223be.2936e","wires":[[]]},{"id":"f255c05d.7948a","type":"execute","name":"generate network-ar url - replace service-instance-id","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$prop.restapi.network-provided-resource`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.network-ar-url\"/>\n    <parameter name=\"target\" value=\"{service-instance-id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.ar.parent-service-instance-id`\"/>\n","comments":"","outputs":1,"x":831.2739562988281,"y":2318.368896484375,"z":"fd8223be.2936e","wires":[[]]},{"id":"4bc63892.dc826","type":"comment","name":"allotted resource already exists- no op","info":"","comments":"","x":2516.7498817443848,"y":3931.4163995981216,"z":"fd8223be.2936e","wires":[]},{"id":"80af03e.6ba0e8","type":"comment","name":"Other Rollbacks? ","info":"","comments":"","x":1286.0832328796387,"y":4651.416703224182,"z":"fd8223be.2936e","wires":[]},{"id":"358b2d3.80d5a52","type":"comment","name":"MDSal adaptor only saves consuming service so parent service and AR are done by Rest api calls","info":"","comments":"","x":678.7499389648438,"y":69.74998950958252,"z":"fd8223be.2936e","wires":[]},{"id":"1b0fea44.83ef26","type":"comment","name":"Parameter names","info":"INPUT:\ncto-api.parent-service-instance-id\ncto-api.port-mirror-configuration-instance-id\ncto-api.source-network-role\ncto-api.collector-network-role\ncto-api.default-domain\ncto-api.default-project\ncto-api.cloud-region-id\ncto-api.service-type\nOUTPUT:\ncto-api.contrail-route-allotted-resource-id\n","comments":"","x":425.75,"y":102.75000476837158,"z":"fd8223be.2936e","wires":[]},{"id":"7213d545.2b0f9c","type":"save","name":"Get network from AAI for source network","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n      resource=\"custom-query\"\n      key=\"format = 'resource'\"\n      force=\"true\"\n      local-only=\"false\"\n      pfx=\"ctotmp.aai.source-network\">\n      <parameter name=\"start[0]\" value=\"`'/cloud-infrastructure/cloud-regions/cloud-region/' + $cto-api.cloud-owner + '/'  + $cto-api.cloud-region-id`\" />\n      <parameter name=\"start_length\" value=\"1\" /> \n      <parameter name=\"query\" value=\"`'/query/network-name-fromNetwork-role?networkRole='  + $cto-api.source-network-role`\" /> \n","comments":"","outputs":1,"x":835.4283599853516,"y":476.65470790863037,"z":"fd8223be.2936e","wires":[["f489a184.f63528","90317c35.5ed19"]]},{"id":"f489a184.f63528","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1107.5712089538574,"y":446.6548328399658,"z":"fd8223be.2936e","wires":[["b7191164.dbdd18"]]},{"id":"b7191164.dbdd18","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1276.8093223571777,"y":437.13086891174316,"z":"fd8223be.2936e","wires":[["4e660df0.8c2e1c"]]},{"id":"90317c35.5ed19","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1109.3568572998047,"y":476.71428298950195,"z":"fd8223be.2936e","wires":[["23eddc08.e69244"]]},{"id":"23eddc08.e69244","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1273.6425666809082,"y":475.28576469421387,"z":"fd8223be.2936e","wires":[["7fc789ae.200978"]]},{"id":"2e387eee.1a638a","type":"configure","name":"set default values","xml":"<set>\n<parameter name=\"ctotmp.s-l3-network\" value=\"\" />\n<parameter name=\"ctotmp.num-s-network\" value=\"0\" />\n<parameter name=\"ctotmp.s-network-policy\" value=\"\" />\n<parameter name=\"ctotmp.num-s-np\" value=\"0\" />\n<parameter name=\"ctotmp.c-l3-network\" value=\"\" />\n<parameter name=\"ctotmp.num-c-network\" value=\"0\" />\n<parameter name=\"ctotmp.c-network-policy\" value=\"\" />\n<parameter name=\"ctotmp.num-c-np\" value=\"0\" />\n<parameter name=\"ctotmp.s-network-policy-list_length\" value=\"0\" />\n<parameter name=\"ctotmp.c-network-policy-list_length\" value=\"0\" />\n<parameter name=\"ctotmp.network-policy-id\" value=\"\" />\n<parameter name=\"ctotmp.action\" value=\"create\" />\n","comments":"","outputs":1,"x":774.4165954589844,"y":314.2737703323364,"z":"fd8223be.2936e","wires":[[]]},{"id":"527138b.89bd148","type":"comment","name":"Get l3-network/policy for source network role","info":"","comments":"","x":837.5117034912109,"y":446.65477657318115,"z":"fd8223be.2936e","wires":[]},{"id":"4e660df0.8c2e1c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"API-contrail-route-topology-operation-create: Failed to get source network from aai\" />\n","comments":"","x":1449.4166374206543,"y":439.2737159729004,"z":"fd8223be.2936e","wires":[]},{"id":"7fc789ae.200978","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"API-contrail-route-topology-operation-create: Source network not found in AAI\" />\n","comments":"","x":1447.9878578186035,"y":473.5594291687012,"z":"fd8223be.2936e","wires":[]},{"id":"37ded934.68fab6","type":"for","name":"for each src network","xml":"<for index='ctotmp.sidx' start='0' end='`$ctotmp.aai.source-network.results_length`' >\n","comments":"","outputs":1,"x":772.7499237060547,"y":551.416615486145,"z":"fd8223be.2936e","wires":[["b901219f.362c48"]]},{"id":"62ec4e1c.4e5e1","type":"switchNode","name":"check for network-policy","xml":"<switch test='`$ctotmp.aai.source-network.results[$ctotmp.sidx].network-policy.network-policy-id`'>\n","comments":"","outputs":1,"x":1189.4167175292969,"y":551.0831060409546,"z":"fd8223be.2936e","wires":[["82e974a5.880ec","ab575fe2.1a7378"]]},{"id":"82e974a5.880ec","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1379.4165573120117,"y":533.0831651687622,"z":"fd8223be.2936e","wires":[["b8c1cb2a.2baaa"]]},{"id":"ab575fe2.1a7378","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1382.7498397827148,"y":569.5118780136108,"z":"fd8223be.2936e","wires":[["fdc0d899.f8967"]]},{"id":"b8c1cb2a.2baaa","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1541.0832214355469,"y":533.797441482544,"z":"fd8223be.2936e","wires":[[]]},{"id":"fdc0d899.f8967","type":"switchNode","name":"switch network-policy-id","xml":"<switch test='`$ctotmp.aai.source-network.results[$ctotmp.sidx].network-policy.network-policy-id`'>\n","comments":"","outputs":1,"x":1569.416763305664,"y":568.0834722518921,"z":"fd8223be.2936e","wires":[["9a0326c9.066d","f2d265f2.4447a8"]]},{"id":"9a0326c9.066d","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1794.4165344238281,"y":541.4164571762085,"z":"fd8223be.2936e","wires":[["924c99f0.70c"]]},{"id":"f2d265f2.4447a8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1792.7497596740723,"y":569.5117740631104,"z":"fd8223be.2936e","wires":[["d577bcf4.265fc8"]]},{"id":"d577bcf4.265fc8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1957.749843597412,"y":578.0831642150879,"z":"fd8223be.2936e","wires":[["ecf1fa5d.04cc2","cbfccf94.e608c8","400312fa.149e74"]]},{"id":"ecf1fa5d.04cc2","type":"configure","name":"set ctotmp.num-s-np","xml":"<set>\n<parameter name=\"ctotmp.num-s-np\" value=\"`$ctotmp.num-s-np+1`\" />\n","comments":"","outputs":1,"x":2189.9881744384766,"y":569.4641437530518,"z":"fd8223be.2936e","wires":[[]]},{"id":"924c99f0.70c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1962.7498626708984,"y":543.083291053772,"z":"fd8223be.2936e","wires":[[]]},{"id":"5abec00b.b100b","type":"switchNode","name":"check for l3-network","xml":"<switch test='`$ctotmp.aai.source-network.results[$ctotmp.sidx].l3-network.network-id`'>\n","comments":"","outputs":1,"x":1179.416648864746,"y":629.7497749328613,"z":"fd8223be.2936e","wires":[["e1486c36.e9aba8","7fb419d1.9615e8"]]},{"id":"e1486c36.e9aba8","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1386.0831832885742,"y":614.7498550415039,"z":"fd8223be.2936e","wires":[["83b5f616.98f4c"]]},{"id":"7fb419d1.9615e8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1389.4164657592773,"y":652.8451910018921,"z":"fd8223be.2936e","wires":[["1db68be1.b1d39c"]]},{"id":"83b5f616.98f4c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1547.749813079834,"y":615.1308164596558,"z":"fd8223be.2936e","wires":[[]]},{"id":"1db68be1.b1d39c","type":"switchNode","name":"switch network-id","xml":"<switch test='`$ctotmp.aai.source-network.results[$ctotmp.sidx].l3-network.network-id`'>\n","comments":"","outputs":1,"x":1561.083351135254,"y":653.0834550857544,"z":"fd8223be.2936e","wires":[["63feb3f3.840974","5823b7ec.89fb68"]]},{"id":"63feb3f3.840974","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1799.4164924621582,"y":631.4164018630981,"z":"fd8223be.2936e","wires":[["a870e259.8f814"]]},{"id":"5823b7ec.89fb68","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1801.0830917358398,"y":676.1784429550171,"z":"fd8223be.2936e","wires":[["d04fa4d.65ff158"]]},{"id":"d04fa4d.65ff158","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1959.4165344238281,"y":674.7497701644897,"z":"fd8223be.2936e","wires":[["f43dcd75.cd43d8"]]},{"id":"a870e259.8f814","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1969.4164562225342,"y":631.4166040420532,"z":"fd8223be.2936e","wires":[[]]},{"id":"b901219f.362c48","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":977.7498626708984,"y":551.4166040420532,"z":"fd8223be.2936e","wires":[["62ec4e1c.4e5e1","5abec00b.b100b"]]},{"id":"f43dcd75.cd43d8","type":"configure","name":"set s-l3-network and num-s-network","xml":"<set>\n<parameter name=\"ctotmp.s-l3-network.\" value=\"`$ctotmp.aai.source-network.results[$ctotmp.sidx].l3-network.`\" />\n<parameter name=\"ctotmp.num-s-network\" value=\"`$ctotmp.num-s-network+1`\" />\n\n","comments":"","outputs":1,"x":2214.0830078125,"y":673.0832681655884,"z":"fd8223be.2936e","wires":[[]]},{"id":"4c419af6.dc942c","type":"configure","name":"clear internal data","xml":"<set>\n<parameter name=\"ctotmp.\" value=\"\" />\n<parameter name=\"ar-request-information.\" value=\"\" />\n<parameter name=\"ar-created\" value=\"\" />\n<parameter name=\"ar-aai-created\" value=\"\" />\n<parameter name=\"np-aai-created\" value=\"\" />\n<parameter name=\"contrail-created\" value=\"\" />\n","comments":"","outputs":1,"x":771.0833129882812,"y":279.7499985694885,"z":"fd8223be.2936e","wires":[[]]},{"id":"948c94af.a879","type":"set","name":"set ar-contrail-route=request-input","xml":"<set>\n<parameter name='ar-contrail-route-request-input.source-network.network-role' value=\"`$cto-api.source-network-role`\" />\n<parameter name='ar-contrail-route-request-input.source-network.network-id' value=\"`$ctotmp.source-network.network-id`\" />\n<parameter name='ar-contrail-route-request-input.dest-network.network-role' value=\"`$cto-api.collector-network-role`\" />\n<parameter name='ar-contrail-route-request-input.dest-network.network-id' value=\"`$ctotmp.dest-network.network-id`\" />\n\n","comments":"","x":799.4167327880859,"y":1686.7498121261597,"z":"fd8223be.2936e","wires":[]},{"id":"c5de323f.f81938","type":"switchNode","name":"switch num-s-network","xml":"<switch test='`$ctotmp.num-s-network`'>\n","comments":"","outputs":1,"x":774.4166107177734,"y":723.0831327438354,"z":"fd8223be.2936e","wires":[["64a3201b.dafe8","48b7d85e.afa768","ec81d452.09a2b8"]]},{"id":"48b7d85e.afa768","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":971.0833282470703,"y":761.4166269302368,"z":"fd8223be.2936e","wires":[["8202168f.6d8d48"]]},{"id":"64a3201b.dafe8","type":"other","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":971.0832405090332,"y":692.7498483657837,"z":"fd8223be.2936e","wires":[["3828f995.1688fe"]]},{"id":"ec81d452.09a2b8","type":"other","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":969.4166107177734,"y":728.0831747055054,"z":"fd8223be.2936e","wires":[["7c1e2f87.932f5"]]},{"id":"3828f995.1688fe","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"API-contrail-route-topology-operation-create: Source network not found from aai\" />\n","comments":"","x":1134.4165534973145,"y":692.7498826980591,"z":"fd8223be.2936e","wires":[]},{"id":"8202168f.6d8d48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"API-contrail-route-topology-operation-create: Too many networks returned for source network from aai\" />\n","comments":"","x":1130.7498970031738,"y":761.7498617172241,"z":"fd8223be.2936e","wires":[]},{"id":"7c1e2f87.932f5","type":"configure","name":"set source network-id","xml":"<set>\n<parameter name=\"ctotmp.source-network.network-id\" value=\"`$ctotmp.s-l3-network.network-id`\" />\n\n\n","comments":"","outputs":1,"x":1157.75,"y":731.0833024978638,"z":"fd8223be.2936e","wires":[[]]},{"id":"c3814cf0.0b0738","type":"save","name":"Get network from AAI for collector network","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n      resource=\"custom-query\"\n      key=\"format = 'resource'\"\n      force=\"true\"\n      local-only=\"false\"\n      pfx=\"ctotmp.aai.collector-network\">\n      <parameter name=\"start[0]\" value=\"`'/cloud-infrastructure/cloud-regions/cloud-region/' + $cto-api.cloud-owner + '/'  + $cto-api.cloud-region-id`\" />\n      <parameter name=\"start_length\" value=\"1\" /> \n      <parameter name=\"query\" value=\"`'/query/network-name-fromNetwork-role?networkRole='  + $cto-api.collector-network-role`\" /> \n","comments":"","outputs":1,"x":844.4166564941406,"y":864.7499113082886,"z":"fd8223be.2936e","wires":[["bb88165.d1937e8","7f15d0fc.069948"]]},{"id":"bb88165.d1937e8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1116.5595054626465,"y":834.750036239624,"z":"fd8223be.2936e","wires":[["bde8dca0.2e98d"]]},{"id":"bde8dca0.2e98d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1285.7976188659668,"y":825.2260723114014,"z":"fd8223be.2936e","wires":[["f2f89124.07b14"]]},{"id":"7f15d0fc.069948","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1118.3451538085938,"y":864.8094863891602,"z":"fd8223be.2936e","wires":[["716be41c.d6d394"]]},{"id":"716be41c.d6d394","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1282.6308631896973,"y":863.3809680938721,"z":"fd8223be.2936e","wires":[["ffe76153.cabf68"]]},{"id":"56ea117c.705cb8","type":"comment","name":"Get l3-network/policy for collector network role","info":"","comments":"","x":846.5,"y":834.7499799728394,"z":"fd8223be.2936e","wires":[]},{"id":"f2f89124.07b14","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"API-contrail-route-topology-operation-create: Failed to get collector network from aai\" />\n","comments":"","x":1458.4049339294434,"y":827.3689193725586,"z":"fd8223be.2936e","wires":[]},{"id":"ffe76153.cabf68","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"API-contrail-route-topology-operation-create: Collector network not found in AAI\" />\n","comments":"","x":1456.9761543273926,"y":861.6546325683594,"z":"fd8223be.2936e","wires":[]},{"id":"7cae277d.772588","type":"for","name":"for each collector network","xml":"<for index='ctotmp.cidx' start='0' end='`$ctotmp.aai.collector-network.results_length`' >\n","comments":"","outputs":1,"x":771.4049072265625,"y":952.5117797851562,"z":"fd8223be.2936e","wires":[["f0662510.4e8fb8"]]},{"id":"230f1cfd.35f71c","type":"switchNode","name":"check for l3-network","xml":"<switch test='`$ctotmp.aai.collector-network.results[$ctotmp.cidx].l3-network.network-id`'>\n","comments":"","outputs":1,"x":1208.0716552734375,"y":954.1781616210938,"z":"fd8223be.2936e","wires":[["fbe44b80.49bb3","578fb4d0.480724"]]},{"id":"fbe44b80.49bb3","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1415.0714111328125,"y":953.1783447265625,"z":"fd8223be.2936e","wires":[["b5d85abf.060458"]]},{"id":"578fb4d0.480724","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1418.4046936035156,"y":991.2736806869507,"z":"fd8223be.2936e","wires":[["9d0af548.8c9958"]]},{"id":"9d0af548.8c9958","type":"switchNode","name":"switch network-id","xml":"<switch test='`$ctotmp.aai.collector-network.results[$ctotmp.cidx].l3-network.network-id`'>\n","comments":"","outputs":1,"x":1590.0715789794922,"y":991.511944770813,"z":"fd8223be.2936e","wires":[["643bc785.a07d5","a9f3513.8d7ddb"]]},{"id":"643bc785.a07d5","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1777.7381591796875,"y":992.511474609375,"z":"fd8223be.2936e","wires":[["26d45d59.14ab12"]]},{"id":"a9f3513.8d7ddb","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1779.4047584533691,"y":1037.273515701294,"z":"fd8223be.2936e","wires":[["ba7314d9.3de7b8"]]},{"id":"ba7314d9.3de7b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1937.7382011413574,"y":1035.8448429107666,"z":"fd8223be.2936e","wires":[["fbe27f49.91dd28","94eb59a2.0945b"]]},{"id":"26d45d59.14ab12","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1947.7381229400635,"y":992.5116767883301,"z":"fd8223be.2936e","wires":[[]]},{"id":"f0662510.4e8fb8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":996.7381973266602,"y":952.8450679779053,"z":"fd8223be.2936e","wires":[["230f1cfd.35f71c"]]},{"id":"fbe27f49.91dd28","type":"configure","name":"set c-l3-network and num-c-network","xml":"<set>\n<parameter name=\"ctotmp.c-l3-network.\" value=\"`$ctotmp.aai.collector-network.results[$ctotmp.cidx].l3-network.`\" />\n<parameter name=\"ctotmp.num-c-network\" value=\"`$ctotmp.num-c-network+1`\" />\n\n","comments":"","outputs":1,"x":2215.40478515625,"y":999.1783447265625,"z":"fd8223be.2936e","wires":[[]]},{"id":"810fdfd4.2afd5","type":"comment","name":"Do we need to check for > 1","info":"","comments":"","x":791.0833168029785,"y":678.0833911895752,"z":"fd8223be.2936e","wires":[]},{"id":"cbfccf94.e608c8","type":"configure","name":"add s-network-policy-id to list","xml":"<set>\n<parameter name=\"ctotmp.s-network-policy-list[$ctotmp.num-s-np].network-policy-id\" value=\"`$ctotmp.aai.source-network.results[$ctotmp.sidx].network-policy.network-policy-id`\" />\n\n","comments":"","outputs":1,"x":2212.749931335449,"y":543.0833034515381,"z":"fd8223be.2936e","wires":[[]]},{"id":"400312fa.149e74","type":"configure","name":"set s-network-policy-list_length","xml":"<set>\n<parameter name=\"ctotmp.s-network-policy-list_length\" value=\"`$ctotmp.num-s-np`\" />\n","comments":"","outputs":1,"x":2214.4168434143066,"y":604.7499723434448,"z":"fd8223be.2936e","wires":[[]]},{"id":"4a08ade2.d13b7c","type":"for","name":"for each source-network-policy","xml":"<for index='ctotmp.spidx' start='0' end='`$ctotmp.s-network-policy-list_length`' >\n","comments":"","outputs":1,"x":783.0833384394646,"y":1349.749788761139,"z":"fd8223be.2936e","wires":[["6b08e08e.3836b"]]},{"id":"6b08e08e.3836b","type":"for","name":"for each collector-network-policy","xml":"<for index='ctotmp.cpidx' start='0' end='`$ctotmp.c-network-policy-list_length`' >\n","comments":"","outputs":1,"x":1089.7500101923943,"y":1348.0831761360168,"z":"fd8223be.2936e","wires":[["3578a521.ca3c32"]]},{"id":"3578a521.ca3c32","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1348.0832774043083,"y":1348.0831627845764,"z":"fd8223be.2936e","wires":[["3948c7e7.d3adb8"]]},{"id":"1433c949.6a3ddf","type":"comment","name":"Check if the source and collector network tied to same network policy","info":"","comments":"","x":903.0833231806755,"y":1313.083164691925,"z":"fd8223be.2936e","wires":[]},{"id":"6c53e4ce.fecfe4","type":"switchNode","name":"switch num-c-network","xml":"<switch test='`$ctotmp.num-c-network`'>\n","comments":"","outputs":1,"x":768.083273589611,"y":1201.4165048599243,"z":"fd8223be.2936e","wires":[["57594924.deefc8","9e18ade.cd92a5","fdd09fb3.c645a"]]},{"id":"9e18ade.cd92a5","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":964.7499694824219,"y":1239.749945640564,"z":"fd8223be.2936e","wires":[["9edabcd2.3b55a8"]]},{"id":"57594924.deefc8","type":"other","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":966.4165954589844,"y":1176.083170890808,"z":"fd8223be.2936e","wires":[["388cf1b9.8ef3a6"]]},{"id":"fdd09fb3.c645a","type":"other","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":963.083251953125,"y":1206.4164934158325,"z":"fd8223be.2936e","wires":[["cad12ae1.434178"]]},{"id":"388cf1b9.8ef3a6","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"API-contrail-route-topology-operation-create: Collector network not found from aai\" />\n","comments":"","x":1121.7498779296875,"y":1177.083251953125,"z":"fd8223be.2936e","wires":[]},{"id":"9edabcd2.3b55a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"API-contrail-route-topology-operation-create: Too many networks returned for collector network from aai\" />\n","comments":"","x":1124.4165382385254,"y":1240.0831804275513,"z":"fd8223be.2936e","wires":[]},{"id":"cad12ae1.434178","type":"configure","name":"set collector network-id","xml":"<set>\n<parameter name=\"ctotmp.dest-network.network-id\" value=\"`$ctotmp.c-l3-network.network-id`\" />\n\n\n","comments":"","outputs":1,"x":1151.4166412353516,"y":1208.4166345596313,"z":"fd8223be.2936e","wires":[[]]},{"id":"928568b8.42cae","type":"comment","name":"Do we need to check for > 1","info":"","comments":"","x":786.4167391657829,"y":1163.0834650993347,"z":"fd8223be.2936e","wires":[]},{"id":"3948c7e7.d3adb8","type":"switchNode","name":"switch source policy = collector policy","xml":"<switch test='`$ctotmp.s-network-policy-list[$ctotmp.spidx].network-policy-id == $ctotmp.c-network-policy-list[$ctotmp.cpidx].network-policy-id`'>\n","comments":"","outputs":1,"x":1622.4166259765625,"y":1350.08336353302,"z":"fd8223be.2936e","wires":[["d30cdd30.d5a818"]]},{"id":"4a42aa8b.83e934","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2055.7499771118164,"y":1348.4166588783264,"z":"fd8223be.2936e","wires":[["2e7bff75.08d278","a90dd523.58d14"]]},{"id":"2e7bff75.08d278","type":"configure","name":"set ctotmp.network-policy-id","xml":"<set>\n<parameter name=\"ctotmp.network-policy-id\" value=\"`$ctotmp.s-network-policy-list[$ctotmp.spidx].network-policy-id`\" />\n<parameter name=\"ctotmp.existing-network-policy-found\" value=\"true\" />","comments":"","outputs":1,"x":2310.7499771118164,"y":1348.4166588783264,"z":"fd8223be.2936e","wires":[[]]},{"id":"a90dd523.58d14","type":"break","name":"break","xml":"<break>\n","comments":"","x":2249.083236694336,"y":1425.08340549469,"z":"fd8223be.2936e","wires":[]},{"id":"d30cdd30.d5a818","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1870.7499732971191,"y":1348.4166555404663,"z":"fd8223be.2936e","wires":[["4a42aa8b.83e934"]]},{"id":"fd2ab770.01bd18","type":"comment","name":"if network policy found, get AR and return to calling method","info":"","comments":"","x":876.4166628718376,"y":1458.4165740013123,"z":"fd8223be.2936e","wires":[]},{"id":"910ed547.3ffca","type":"switchNode","name":"switch network-policy-id","xml":"<switch test='`$ctotmp.network-policy-id`'>\n","comments":"","outputs":1,"x":773.0833498835564,"y":1493.0831999778748,"z":"fd8223be.2936e","wires":[["dc9f60fd.a57cb","ef776953.3d7ee8"]]},{"id":"dc9f60fd.a57cb","type":"outcome","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":979.7500101923943,"y":1491.4167160987854,"z":"fd8223be.2936e","wires":[["931d7263.438eb"]]},{"id":"ef776953.3d7ee8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":983.0833422541618,"y":1524.7500100135803,"z":"fd8223be.2936e","wires":[["4fb26c91.499a04"]]},{"id":"931d7263.438eb","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1144.7499606013298,"y":1491.4165968894958,"z":"fd8223be.2936e","wires":[[]]},{"id":"4fb26c91.499a04","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1154.749912917614,"y":1524.749927997589,"z":"fd8223be.2936e","wires":[["e80a0448.c77ed"]]},{"id":"e80a0448.c77ed","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"existing policy - error\" />\n","comments":"","x":1388.0832964777946,"y":1524.7498869895935,"z":"fd8223be.2936e","wires":[]},{"id":"218546c.191c6ba","type":"comment","name":"Flow to create the allotted resource","info":"","comments":"","x":791.0833129882812,"y":1557.4167375564575,"z":"fd8223be.2936e","wires":[]},{"id":"f542c02a.d7178","type":"comment","name":"Flow to use the existing allotted resource - TBD","info":"","comments":"","x":1467.7498779296875,"y":1409.749927520752,"z":"fd8223be.2936e","wires":[]},{"id":"bbda49e2.2a06b8","type":"comment","name":"Begin setup of new Allotted Resource","info":"","comments":"","x":802.7500457763672,"y":1591.416841506958,"z":"fd8223be.2936e","wires":[]},{"id":"dfa7d0a5.73fd4","type":"set","name":"set ar-identifiers","xml":"<set>\n<parameter name='ar-identifiers.allotted-resource-id' value=\"`$tmp.return.generate-allottedresource-id.id`\" />\n<parameter name='ar-identifiers.allotted-resource-type' value=\"contrail-route\" />\n<parameter name='ar-identifiers.parent-service-instance-id' value=\"`$cto-api.parent-service-instance-id`\" />\n<parameter name='ar-identifiers.consuming-service-instance-id' value=\"`$cto-api.service-instance-id` \" />\n<parameter name=\"tmp.ar.allotted-resource-id\" value=\"`$tmp.return.generate-allottedresource-id.id`\" />\n<parameter name='tmp.ar.allotted-resource-type' value=\"contrail-route\" />\n<parameter name='tmp.ar.parent-service-instance-id' value=\"`$cto-api.parent-service-instance-id`\" />\n<!-- <parameter name='tmp.ar.contrail-applied-service-instance-id' value='' />  -->\n","comments":"","x":742.4166717529297,"y":1771.4163599014282,"z":"fd8223be.2936e","wires":[]},{"id":"326513f8.a01924","type":"call","name":"call generate-allottedresource-id","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-allottedresource-id' mode='sync' >\n","comments":"","outputs":1,"x":793.2258377075195,"y":1723.8451147079468,"z":"fd8223be.2936e","wires":[[]]},{"id":"82250dcd.64764","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":831.0832824707031,"y":346.41666889190674,"z":"fd8223be.2936e","wires":[[]]},{"id":"4b4507fd.641f08","type":"comment","name":"Generate contrail-route-allotted-resource-name","info":"","comments":"","x":806.0833129882812,"y":2394.7499895095825,"z":"fd8223be.2936e","wires":[]},{"id":"dfce0d66.98785","type":"execute","name":"execute Contrail API create network policy","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='create' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='default-domain' value='`$cto-api.default-domain`' />\n<parameter name='policy-name' value='`$tmp.fq-name`' />\n<parameter name='default-project' value='`$cto-api.default-project`' /> \n<!-- <parameter name='vipr-service-instance' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.contrail-applied-service.contrail-fqdn`' /> -->\n<parameter name='dst-virtual-network' value='`$ctotmp.c-l3-network.contrail-network-fqdn`' />\n<parameter name='src-virtual-network' value='`$ctotmp.s-l3-network.contrail-network-fqdn`' />\n<parameter name='direction' value='&lt;&gt;' />\n<parameter name='cloud-region-id' value='`$cto-api.cloud-region-id`' />\n\n","comments":"","outputs":1,"x":1486.0832824707031,"y":3370.1665449142456,"z":"fd8223be.2936e","wires":[["92f7cb34.8d741","f883d241.386fa8"]]},{"id":"92f7cb34.8d741","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1767.464126586914,"y":3339.5587922669947,"z":"fd8223be.2936e","wires":[["76c29cb0.6bee94"]]},{"id":"f883d241.386fa8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1765.5594482421875,"y":3372.558732032776,"z":"fd8223be.2936e","wires":[["bc08711f.026b2"]]},{"id":"bc08711f.026b2","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"`'Failed to create policy in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `\" />\n","comments":"","x":1925.464256286621,"y":3371.8921794891357,"z":"fd8223be.2936e","wires":[]},{"id":"22859f1a.190d08","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-create\"/>\n<parameter name='field3' value='network-policy' />\n<parameter name='field4' value='create' />\n<parameter name='field5' value='contrailResp' />\n<parameter name='field6' value='`$cto-api.default-domain`' />\n<parameter name='field7' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name`' />\n<parameter name='field8' value='`$cto-api.default-project`' />\n<parameter name='field9' value='`$ctotmp.c-l3-network.contrail-network-fqdn`' />\n<parameter name='field10' value='`$ctotmp.s-l3-network.contrail-network-fqdn`' />\n<parameter name='field11' value='&lt;&gt;' />\n<parameter name='field12' value='`$cto-api.cloud-region-id`' />\n\n\n\n","comments":"","outputs":1,"x":1374.1784362792969,"y":3341.177879333496,"z":"fd8223be.2936e","wires":[[]]},{"id":"76c29cb0.6bee94","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1919.6546096801758,"y":3340.225517272949,"z":"fd8223be.2936e","wires":[["ec5e5cc0.84dc"]]},{"id":"b797c1f1.3a6cd","type":"comment","name":"Create contrail network policy","info":"","comments":"","x":1439.416618347168,"y":3303.083293914795,"z":"fd8223be.2936e","wires":[]},{"id":"d9ba8a84.a48ee8","type":"set","name":"set ar-assignments.contrail-id","xml":"<set>\n<parameter name='ar-assignments.contrail-id' value=\"`$contrailResp.network-policy.uuid`\" />\n\n\n\n","comments":"","x":1444.7498779296875,"y":3401.7499895095825,"z":"fd8223be.2936e","wires":[]},{"id":"17c62791.e0bba","type":"switchNode","name":"switch cto-api.isTest","xml":"<switch test='`$cto-api.isTest`'>\n","comments":"","outputs":1,"x":682.7500076293945,"y":3339.749550819397,"z":"fd8223be.2936e","wires":[["7f3a60.3bfda5a","21cedbd5.f69f9c","71aa4797.6d83f8"]]},{"id":"7f3a60.3bfda5a","type":"outcome","name":"Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":882.7500534057617,"y":3343.083215713501,"z":"fd8223be.2936e","wires":[["4847b370.9b6efc"]]},{"id":"21cedbd5.f69f9c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":881.0833435058594,"y":3379.7496404647827,"z":"fd8223be.2936e","wires":[["cea0da6e.4187f8"]]},{"id":"71aa4797.6d83f8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":887.7500343322754,"y":3418.08305644989,"z":"fd8223be.2936e","wires":[["4847b370.9b6efc"]]},{"id":"4847b370.9b6efc","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1101.083251953125,"y":3343.0832414627075,"z":"fd8223be.2936e","wires":[["22859f1a.190d08","dfce0d66.98785","d9ba8a84.a48ee8"]]},{"id":"7fc0fc65.5a5e64","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-create\"/>\n<parameter name='field3' value='network-policy' />\n<parameter name='field4' value='TESTcreate' />\n<parameter name='field5' value='contrailResp' />\n<parameter name='field6' value='`$cto-api.default-domain`' />\n<parameter name='field7' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name`' />\n<parameter name='field8' value='`$cto-api.default-project`' />\n<parameter name='field10' value='`$ctotmp.c-l3-network.contrail-network-fqdn`' />\n<parameter name='field11' value='`$ctotmp.s-l3-network.contrail-network-fqdn`' />\n<parameter name='field12' value='&lt;&gt;' />\n<parameter name='field13' value='`$cto-api.cloud-region-id`' />\n\n\n\n","comments":"","outputs":1,"x":1380.5117874145508,"y":3441.8444213867188,"z":"fd8223be.2936e","wires":[[]]},{"id":"81e3b72c.ed4c2","type":"set","name":"set ar-assignments.contrail-id","xml":"<set>\n<parameter name='ar-assignments.contrail-id' value=\"dummy12345\" />\n\n\n\n","comments":"","x":1447.7498779296875,"y":3476.7497453689575,"z":"fd8223be.2936e","wires":[]},{"id":"cea0da6e.4187f8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1100.083251953125,"y":3439.0832414627075,"z":"fd8223be.2936e","wires":[["7fc0fc65.5a5e64","81e3b72c.ed4c2"]]},{"id":"e040148a.f082c","type":"comment","name":"Create  network policy in AAI","info":"","comments":"","x":662.7499747872353,"y":3536.4164934158325,"z":"fd8223be.2936e","wires":[]},{"id":"1e7787ad.0d68a8","type":"save","name":"save AnAI - network-policy","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"network-policy\" \n\t\tkey=\"network-policy.network-policy-id = $ar-assignments.contrail-id\" >\n<!-- Create network-policy object -->\n<parameter name=\"network-policy-id\" value=\"`$ar-assignments.contrail-id`\" />\n<parameter name=\"network-policy-fqdn\" value=\"`$ar-assignments.fq-name`\" />\n\n\n","comments":"","outputs":1,"x":669.7935333251953,"y":3571.817353248596,"z":"fd8223be.2936e","wires":[["fcabb970.d046e","fb253b0.c7b5ec8","ec0a2bbf.24a89"]]},{"id":"fcabb970.d046e","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":921.9009757637978,"y":3562.781409263611,"z":"fd8223be.2936e","wires":[["2e92d1d0.b575ce"]]},{"id":"fb253b0.c7b5ec8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":925.7104735970497,"y":3592.2578258514404,"z":"fd8223be.2936e","wires":[["2e92d1d0.b575ce"]]},{"id":"3b1f3b10.705a0c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1117.4166259765625,"y":3677.4164934158325,"z":"fd8223be.2936e","wires":[["975d575f.5bd068","76e9e56c.5f957c"]]},{"id":"e4cbef08.1b2cb8","type":"comment","name":"DESCOPED: CR177011 - network policy - set relationship to collector service instance -id","info":"","comments":"","x":830.75,"y":3773.749755859375,"z":"fd8223be.2936e","wires":[]},{"id":"1efde37a.eba0f5","type":"save","name":"save AnAI - network-policy relationship to service instances","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"network-policy:relationship-list\" \n\tkey=\"network-policy.network-policy-id = $ar-assignments.contrail-id\" >\n\t\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"service-instance\" />\n\t\t<parameter name=\"relationship-list.relationship[0].related-link\"\n\t\t\tvalue=\"`'/aai/v$/business/customers/customer/' + $service-data.service-information.global-customer-id + '/service-subscriptions/service-subscription/' + $cto-api.service-type + '/service-instances/service-instance/' + $collector-service-instance-id`\" />\n               \n                \n\n","comments":"","outputs":1,"x":762.1268920898438,"y":3814.8171281814575,"z":"fd8223be.2936e","wires":[["b76203a8.07925","5b1ac74f.e6a31"]]},{"id":"b76203a8.07925","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1214.9010009765625,"y":3814.1149797439575,"z":"fd8223be.2936e","wires":[["76ce4e27.d59ec8"]]},{"id":"5b1ac74f.e6a31","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1218.7104988098145,"y":3842.591396331787,"z":"fd8223be.2936e","wires":[["76ce4e27.d59ec8"]]},{"id":"778c350c.8dd8e4","type":"set","name":"Clear tmp data","xml":"<set>\n<parameter name='ctotmp.' value='' />\n\n \n","comments":"","x":591.0833129882812,"y":4748.083022117615,"z":"fd8223be.2936e","wires":[]},{"id":"672a2172.2f5058","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-create\"/>\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='cto-api.owning-entity' />\n<parameter name='field24' value='`$cto-api.owning-entity`' />\n","comments":"","outputs":1,"x":738.1785659790039,"y":249.4642686843872,"z":"fd8223be.2936e","wires":[[]]},{"id":"76ce4e27.d59ec8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1412.75,"y":3818.7499895095825,"z":"fd8223be.2936e","wires":[["890d32.ed09ead","76e9e56c.5f957c"]]},{"id":"4d7901ed.ca6fb8","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":1799.5,"y":5123.9999895095825,"z":"fd8223be.2936e","wires":[["dc1a9d38.d97ca","531a6c1a.e19374"]]},{"id":"dc1a9d38.d97ca","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2053.1508026123047,"y":5102.460497379303,"z":"fd8223be.2936e","wires":[[]]},{"id":"531a6c1a.e19374","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2058.460231781006,"y":5138.031915187836,"z":"fd8223be.2936e","wires":[[]]},{"id":"139d91c1.e6a6be","type":"comment","name":"Update AAI AR","info":"","comments":"","x":1760.7317276000977,"y":5088.650766849518,"z":"fd8223be.2936e","wires":[]},{"id":"ec5f0e07.a1f8c8","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":1793.5,"y":4924.2499895095825,"z":"fd8223be.2936e","wires":[["b7a00272.5b5f","c5732bd5.d065d"]]},{"id":"b7a00272.5b5f","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2040.750072479248,"y":4894.750135421753,"z":"fd8223be.2936e","wires":[[]]},{"id":"c5732bd5.d065d","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2044.5595703125,"y":4924.2265520095825,"z":"fd8223be.2936e","wires":[[]]},{"id":"651e0a3a.ba13e4","type":"comment","name":"Call contrail api here","info":"","comments":"","x":1771.2500228881836,"y":4980.7500931322575,"z":"fd8223be.2936e","wires":[]},{"id":"b22dc036.227bf8","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":1843.2579345703125,"y":5012.7265520095825,"z":"fd8223be.2936e","wires":[["6ac63408.baa50c","d216f91d.6fa1a8","6b2140a3.641028"]]},{"id":"6ac63408.baa50c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2144.638885498047,"y":4978.7577374614775,"z":"fd8223be.2936e","wires":[[]]},{"id":"d216f91d.6fa1a8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2146.067543029785,"y":5049.535438209772,"z":"fd8223be.2936e","wires":[[]]},{"id":"6b2140a3.641028","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2147.3531646728516,"y":5011.639142662287,"z":"fd8223be.2936e","wires":[[]]},{"id":"48bf8bcb.6c23b4","type":"comment","name":"Consilidate the rollback","info":"","comments":"","x":1194.75,"y":4811.4999895095825,"z":"fd8223be.2936e","wires":[]},{"id":"975d575f.5bd068","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"Failed to save allotted resource in AAI\"/>","comments":"","x":1338.75,"y":3677.7499895095825,"z":"fd8223be.2936e","wires":[]},{"id":"76e9e56c.5f957c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":870.75,"y":4972.2499895095825,"z":"fd8223be.2936e","wires":[["908cdbbc.fcfad","f0f708f9.48ace8","be261c82.caf37","ea1c5d0f.4a65f8","fcc7ec18.4965b","8e7b341.ec30848"]]},{"id":"908cdbbc.fcfad","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Error creating contrail route - ' + $tmp.error-message`\"/>","comments":"","x":1170.75,"y":5294.7499895095825,"z":"fd8223be.2936e","wires":[]},{"id":"6506a4f5.c15bac","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"Failed to save network-policy in AAI\"/>","comments":"","x":1346.75,"y":3566.2499895095825,"z":"fd8223be.2936e","wires":[]},{"id":"2e92d1d0.b575ce","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1106.75,"y":3565.2499895095825,"z":"fd8223be.2936e","wires":[["6506a4f5.c15bac","76e9e56c.5f957c"]]},{"id":"f0f708f9.48ace8","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=\"ROLLING BACK the create due to error\"/>\n","comments":"","outputs":1,"x":1157.75,"y":4845.4999895095825,"z":"fd8223be.2936e","wires":[[]]},{"id":"ec5e5cc0.84dc","type":"set","name":"set contrail-created - true","xml":"<set>\n<parameter name=\"contrail-created\" value=\"true\" />","comments":"","x":2124,"y":3339.4999895095825,"z":"fd8223be.2936e","wires":[]},{"id":"7803f431.03b724","type":"set","name":"set np-aai-created - true","xml":"<set>\n<parameter name=\"np-aai-created\" value=\"\" />\n","comments":"","x":1289,"y":3529.4999895095825,"z":"fd8223be.2936e","wires":[]},{"id":"ec0a2bbf.24a89","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":927,"y":3528.4999895095825,"z":"fd8223be.2936e","wires":[["2f05fc17.424bb4"]]},{"id":"2f05fc17.424bb4","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1086,"y":3529.4999895095825,"z":"fd8223be.2936e","wires":[["7803f431.03b724"]]},{"id":"1fca8b85.38bd4c","type":"set","name":"set ar-aai-created - true","xml":"<set>\n<parameter name=\"ar-aai-created\" value=\"\" />","comments":"","x":1277,"y":3636.4999895095825,"z":"fd8223be.2936e","wires":[]},{"id":"e80c53f2.a704a","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":915,"y":3635.4999895095825,"z":"fd8223be.2936e","wires":[["146837ae.85637"]]},{"id":"146837ae.85637","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1074,"y":3636.4999895095825,"z":"fd8223be.2936e","wires":[["1fca8b85.38bd4c"]]},{"id":"116fe1e8.80164e","type":"set","name":"set ar-created - true","xml":"<set>\n<parameter name=\"ar-created\" value=\"true\" />","comments":"","x":1306,"y":4539.4999895095825,"z":"fd8223be.2936e","wires":[]},{"id":"51fd5b3b.c2a0dc","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":944,"y":4538.4999895095825,"z":"fd8223be.2936e","wires":[["322e5dfb.34bfe2"]]},{"id":"322e5dfb.34bfe2","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1103,"y":4539.4999895095825,"z":"fd8223be.2936e","wires":[["116fe1e8.80164e"]]},{"id":"be261c82.caf37","type":"switchNode","name":"switch np-aai-created","xml":"<switch test='`$np-aai-created`'>\n","comments":"","outputs":1,"x":1204.75,"y":4888.4999895095825,"z":"fd8223be.2936e","wires":[["8c52ad11.a1c0e","9040dc3c.a5a528"]]},{"id":"8c52ad11.a1c0e","type":"outcome","name":"Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1404.7500457763672,"y":4891.8336544036865,"z":"fd8223be.2936e","wires":[[]]},{"id":"9040dc3c.a5a528","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1407.0833740234375,"y":4926.4999895095825,"z":"fd8223be.2936e","wires":[["9c1b45b6.b3144"]]},{"id":"9c1b45b6.b3144","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1573.083251953125,"y":4924.8334856033325,"z":"fd8223be.2936e","wires":[["ec5f0e07.a1f8c8"]]},{"id":"ea1c5d0f.4a65f8","type":"switchNode","name":"switch contrail-created","xml":"<switch test='`$contrail-created`'>\n","comments":"","outputs":1,"x":1200.25,"y":4977.9999895095825,"z":"fd8223be.2936e","wires":[["b2997208.7a8af","607d5a5a.f07054"]]},{"id":"b2997208.7a8af","type":"outcome","name":"Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1400.2500457763672,"y":4981.3336544036865,"z":"fd8223be.2936e","wires":[[]]},{"id":"607d5a5a.f07054","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1402.5833740234375,"y":5015.9999895095825,"z":"fd8223be.2936e","wires":[["acea7ab2.ddb138"]]},{"id":"acea7ab2.ddb138","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1568.583251953125,"y":5014.3334856033325,"z":"fd8223be.2936e","wires":[["b22dc036.227bf8"]]},{"id":"fcc7ec18.4965b","type":"switchNode","name":"switch ar-aai-created","xml":"<switch test='`$ar-aai-created`'>\n","comments":"","outputs":1,"x":1198,"y":5087.7499895095825,"z":"fd8223be.2936e","wires":[["eada59bc.798f18","fb9f19d2.609ec8"]]},{"id":"eada59bc.798f18","type":"outcome","name":"Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1398.0000457763672,"y":5091.0836544036865,"z":"fd8223be.2936e","wires":[[]]},{"id":"fb9f19d2.609ec8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1400.3333740234375,"y":5125.7499895095825,"z":"fd8223be.2936e","wires":[["2cd682e1.7c396e"]]},{"id":"2cd682e1.7c396e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1566.333251953125,"y":5124.0834856033325,"z":"fd8223be.2936e","wires":[["4d7901ed.ca6fb8"]]},{"id":"8e7b341.ec30848","type":"switchNode","name":"switch ar-created","xml":"<switch test='`$ar-created`'>\n","comments":"","outputs":1,"x":1201.25,"y":5203.4999895095825,"z":"fd8223be.2936e","wires":[["8b1db97b.6e8948","e4b97998.57d95"]]},{"id":"8b1db97b.6e8948","type":"outcome","name":"Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1401.2500457763672,"y":5206.8336544036865,"z":"fd8223be.2936e","wires":[[]]},{"id":"e4b97998.57d95","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1403.5833740234375,"y":5241.4999895095825,"z":"fd8223be.2936e","wires":[["a6a522a1.9de19"]]},{"id":"a6a522a1.9de19","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1569.583251953125,"y":5239.8334856033325,"z":"fd8223be.2936e","wires":[["7c35b738.cd6098"]]},{"id":"7c35b738.cd6098","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":1839.5,"y":5236.2499895095825,"z":"fd8223be.2936e","wires":[["86fb884b.0720f","31a6b86d.d51c48"]]},{"id":"86fb884b.0720f","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2116.5,"y":5235.2499895095825,"z":"fd8223be.2936e","wires":[[]]},{"id":"31a6b86d.d51c48","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2121.809429168701,"y":5270.821407318115,"z":"fd8223be.2936e","wires":[[]]},{"id":"890d32.ed09ead","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"Failed to save network policy relationship to port mirror service and parent service in AAI\"/>","comments":"","x":1638,"y":3818.2499895095825,"z":"fd8223be.2936e","wires":[]},{"id":"9703e7ab.bcf26","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource\"/>","comments":"","x":1410,"y":4176.7499895095825,"z":"fd8223be.2936e","wires":[]},{"id":"10882401.6b38ec","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1210,"y":4178.7499895095825,"z":"fd8223be.2936e","wires":[["9703e7ab.bcf26","76e9e56c.5f957c"]]},{"id":"b5d85abf.060458","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"API-contrail-route-topology-operation-create: Collector network not found from aai\" />\n","comments":"","x":1583.75,"y":952.75,"z":"fd8223be.2936e","wires":[]},{"id":"94eb59a2.0945b","type":"for","name":"for each relationship","xml":"<for index='ridx' start='0' end='`$ctotmp.aai.collector-network.results[$ctotmp.cidx].l3-network.relationship-list.relationship_length`' >\n","comments":"","outputs":1,"x":2166.5,"y":1038.75,"z":"fd8223be.2936e","wires":[["9b2fcf60.76ea18"]]},{"id":"9b2fcf60.76ea18","type":"switchNode","name":"switch related-to","xml":"<switch test='`$ctotmp.aai.collector-network.results[$ctotmp.cidx].l3-network.relationship-list.relationship[$ridx].related-to`'>\n","comments":"","outputs":1,"x":2381.178466796875,"y":1038.4998779296875,"z":"fd8223be.2936e","wires":[["347998a7.5c8ed","cb6fc427.9ea1d8"]]},{"id":"347998a7.5c8ed","type":"outcome","name":"service-instance","xml":"<outcome value='service-instance'>\n","comments":"","outputs":1,"x":2574.642822265625,"y":1037.8927612304688,"z":"fd8223be.2936e","wires":[["fee79290.82309"]]},{"id":"fee79290.82309","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2753.40478515625,"y":1038.9880981445312,"z":"fd8223be.2936e","wires":[["e5e787d0.c4657"]]},{"id":"4f621b29.09adec","type":"configure","name":"set collector service instance id","xml":"<set>\n<parameter name=\"collector-service-instance-id\" value=\"`$ctotmp.aai.collector-network.results[$ctotmp.cidx].l3-network.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-value`\" />\n\n","comments":"","outputs":1,"x":3965.25,"y":1037.7499389648438,"z":"fd8223be.2936e","wires":[[]]},{"id":"e5e787d0.c4657","type":"for","name":"for each relationship data","xml":"<for index='rdidx' start='0' end='`$ctotmp.aai.collector-network.results[$ctotmp.cidx].l3-network.relationship-list.relationship[$ridx].relationship-data_length`' >\n","comments":"","outputs":1,"x":2969.75,"y":1038,"z":"fd8223be.2936e","wires":[["393822bb.644d6e"]]},{"id":"393822bb.644d6e","type":"switchNode","name":"switch relationship-key","xml":"<switch test='`$ctotmp.aai.collector-network.results[$ctotmp.cidx].l3-network.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-key`'>\n","comments":"","outputs":1,"x":3205.428466796875,"y":1037.7498779296875,"z":"fd8223be.2936e","wires":[["7c9ef3ae.b747f4"]]},{"id":"7c9ef3ae.b747f4","type":"outcome","name":"service-instance.service-instance-id","xml":"<outcome value='service-instance.service-instance-id'>\n","comments":"","outputs":1,"x":3484.892822265625,"y":1037.142822265625,"z":"fd8223be.2936e","wires":[["f1dcb03d.c2cd4"]]},{"id":"f1dcb03d.c2cd4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3727.65478515625,"y":1038.238037109375,"z":"fd8223be.2936e","wires":[["4f621b29.09adec"]]},{"id":"cb6fc427.9ea1d8","type":"outcome","name":"network-policy","xml":"<outcome value='network-policy'>\n","comments":"","outputs":1,"x":2580.5,"y":1101.25,"z":"fd8223be.2936e","wires":[["48d9f017.24fff8"]]},{"id":"48d9f017.24fff8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2759.261962890625,"y":1102.3453369140625,"z":"fd8223be.2936e","wires":[["40c1b7bc.2f5e88"]]},{"id":"40c1b7bc.2f5e88","type":"for","name":"for each relationship data","xml":"<for index='rdidx' start='0' end='`$ctotmp.aai.collector-network.results[$ctotmp.cidx].l3-network.relationship-list.relationship[$ridx].relationship-data_length`' >\n","comments":"","outputs":1,"x":2975.607177734375,"y":1101.3572387695312,"z":"fd8223be.2936e","wires":[["163ead0a.7302ab"]]},{"id":"163ead0a.7302ab","type":"switchNode","name":"switch relationship-key","xml":"<switch test='`$ctotmp.aai.collector-network.results[$ctotmp.cidx].l3-network.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-key`'>\n","comments":"","outputs":1,"x":3211.28564453125,"y":1101.1071166992188,"z":"fd8223be.2936e","wires":[["b60cc617.96d9f"]]},{"id":"b60cc617.96d9f","type":"outcome","name":"network-policy.network-policy-id","xml":"<outcome value='network-policy.network-policy-id'>\n","comments":"","outputs":1,"x":3490.75,"y":1100.5000610351562,"z":"fd8223be.2936e","wires":[["a3b2831.7275e"]]},{"id":"a3b2831.7275e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3733.511962890625,"y":1101.5952758789062,"z":"fd8223be.2936e","wires":[["902a0d6f.7b879","504ee0c3.1648b8","205a6ec0.806dea"]]},{"id":"504ee0c3.1648b8","type":"configure","name":"set ctotmp.num-c-np","xml":"<set>\n<parameter name=\"ctotmp.num-c-np\" value=\"`$ctotmp.num-c-np+1`\" />\n","comments":"","outputs":1,"x":3966.5,"y":1127.25,"z":"fd8223be.2936e","wires":[[]]},{"id":"902a0d6f.7b879","type":"configure","name":"add c-network-policy-id to list","xml":"<set>\n<parameter name=\"ctotmp.c-network-policy-list[$ctotmp.num-c-np].network-policy-id\" value=\"`$ctotmp.aai.collector-network.results[$ctotmp.cidx].l3-network.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-value`\" />\n\n","comments":"","outputs":1,"x":3989.2617568969727,"y":1100.8691596984863,"z":"fd8223be.2936e","wires":[[]]},{"id":"205a6ec0.806dea","type":"configure","name":"set c-network-policy-list_length","xml":"<set>\n<parameter name=\"ctotmp.c-network-policy-list_length\" value=\"`$ctotmp.num-c-np`\" />\n","comments":"","outputs":1,"x":3991.9286403656006,"y":1164.5358610153198,"z":"fd8223be.2936e","wires":[[]]}]