aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.json
blob: 157bc2690e0b65504d0114ed96df28432d4f4d13 (plain)
1
[{"id":"2343aa38.ae315e","type":"dgstart","name":"DGSTART","outputs":1,"x":186.75,"y":117.75,"z":"813dcd9a.d3bce","wires":[["913493cf.16963"]]},{"id":"913493cf.16963","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":332.9880828857422,"y":192.70239353179932,"z":"813dcd9a.d3bce","wires":[["514806e9.504f"]]},{"id":"514806e9.504f","type":"method","name":"contrail-route-topology-operation-activate","xml":"<method rpc='contrail-route-topology-operation-activate' mode='sync'>\n","comments":"","outputs":1,"x":412.9048500061035,"y":261.9404420852661,"z":"813dcd9a.d3bce","wires":[["fa2967be.15261"]]},{"id":"fa2967be.15261","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":321.2261848449707,"y":405.273784160614,"z":"813dcd9a.d3bce","wires":[["824c9a63.64fca","1dc42b23.680e85","f337c1ee.3a3d8","54e90212.74149c","4015e9a8.6cc8c8","efd1fdfe.31dcd","7fbcf301.da9274","b9d822a8.efbda8","d1f0b04b.3903a8","e1945769.4b158","c88e7d42.8dec2","654c455d.66bcbc","b00f0fb6.47e598","d76d4a4a.711878","4863a49a.47232c","4f9959ff.99f5d","212281cc.a674ae","d2d48767.60437","950cc6c.99f39b8","88a7580.32ec5a8","bf22b626.ac2cc","7e19f3fd.32b57c"]]},{"id":"1dc42b23.680e85","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":583.4880561828613,"y":379.0833215713501,"z":"813dcd9a.d3bce","wires":[]},{"id":"824c9a63.64fca","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n\n\n\n","comments":"","x":630.7473182678223,"y":345.3425874710083,"z":"813dcd9a.d3bce","wires":[]},{"id":"f337c1ee.3a3d8","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":652.6005554199219,"y":410.98155403137207,"z":"813dcd9a.d3bce","wires":[[]]},{"id":"4015e9a8.6cc8c8","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":657.4116058349609,"y":553.2095279693604,"z":"813dcd9a.d3bce","wires":[["d9815ba8.9478c","935a116c.d73118"]]},{"id":"54e90212.74149c","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":617.8148460388184,"y":474.76722526550293,"z":"813dcd9a.d3bce","wires":[[]]},{"id":"d9815ba8.9478c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":902.7077102661133,"y":554.0173416137695,"z":"813dcd9a.d3bce","wires":[["8c816029.77b7d"]]},{"id":"8c816029.77b7d","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1071.7077140808105,"y":552.5172424316406,"z":"813dcd9a.d3bce","wires":[["c6cb923e.5c1e18"]]},{"id":"c6cb923e.5c1e18","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1282.564956665039,"y":552.1363716125488,"z":"813dcd9a.d3bce","wires":[["a78a62e1.215ed","fd8c66f.8374618"]]},{"id":"a78a62e1.215ed","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1471.8982620239258,"y":552.1363296508789,"z":"813dcd9a.d3bce","wires":[["67688036.f47e3"]]},{"id":"7ffb3b8e.4eb0f4","type":"set","name":"set ar from get","xml":"<set>\n<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />\n","comments":"","x":1947.9462203979492,"y":545.3745260238647,"z":"813dcd9a.d3bce","wires":[]},{"id":"67688036.f47e3","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1656.4221515655518,"y":549.041163444519,"z":"813dcd9a.d3bce","wires":[["7ffb3b8e.4eb0f4","25851419.744d64","5cdd13c9.86cf44","9c689889.da3ea8"]]},{"id":"25851419.744d64","type":"set","name":"set oper-status","xml":"<set>\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id`' />\n\n","comments":"","x":1955.9461479187012,"y":609.469669342041,"z":"813dcd9a.d3bce","wires":[]},{"id":"96c69243.4da77","type":"comment","name":"GET contrail-route-allotted-resource from mdsal","info":"","comments":"","x":673.5648498535156,"y":519.0886821746826,"z":"813dcd9a.d3bce","wires":[]},{"id":"5cdd13c9.86cf44","type":"switchNode","name":"switch order-status","xml":"<switch test='`$ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1963.946002960205,"y":576.3744812011719,"z":"813dcd9a.d3bce","wires":[["59a0add2.ea7254","d1f313dd.919bc"]]},{"id":"59a0add2.ea7254","type":"outcome","name":"outcome Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":2185.7839584350586,"y":560.4697847366333,"z":"813dcd9a.d3bce","wires":[["2367cfdb.f8a1"]]},{"id":"d1f313dd.919bc","type":"outcome","name":"outcome Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2199.5936737060547,"y":590.8031902313232,"z":"813dcd9a.d3bce","wires":[["5f8feb9f.295cf4"]]},{"id":"5f8feb9f.295cf4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" \n    value=\"`'Existing contrail-route-allotted-resource with order status of ' + $ar.allotted-resource-data.allotted-resource-oper-status.order-status + ', expecting Created.'`\" />\n","comments":"","x":2440.212423324585,"y":593.7077798843384,"z":"813dcd9a.d3bce","wires":[]},{"id":"9c689889.da3ea8","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-cr-ar' value='$mdsal-ar.' />\n","comments":"","x":2035.8032722473145,"y":512.1840181350708,"z":"813dcd9a.d3bce","wires":[]},{"id":"4dccfc3a.7e6a4c","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":588.7076530456543,"y":444.37435245513916,"z":"813dcd9a.d3bce","wires":[]},{"id":"f6d7f132.e76b98","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n    <parameter name=\"error-message\" value=\"Error: Contrail Route not found\" />\n    \n","comments":"","x":1658.416997909546,"y":695.0833854675293,"z":"813dcd9a.d3bce","wires":[]},{"id":"935a116c.d73118","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":894.559513092041,"y":589.0834264755249,"z":"813dcd9a.d3bce","wires":[["c76dc8b4.875448"]]},{"id":"c76dc8b4.875448","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1074.5594635009766,"y":589.7499771118164,"z":"813dcd9a.d3bce","wires":[["f6d7f132.e76b98"]]},{"id":"efd1fdfe.31dcd","type":"set","name":"set ar data","xml":"<set>\n<parameter name='ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='ar.allotted-resource-status.action' value=\"`$contrail-route-topology-operation-input.request-information.request-action` \" />\n<parameter name='ar.allotted-resource-status.rpc-name' value=\"contrail-route-topology-operation\" />\n<parameter name='ar.allotted-resource-status.rpc-action' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$contrail-route-topology-operation-input.request-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$contrail-route-topology-operation-input.service-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.` \" />\n","comments":"","x":567.4166107177734,"y":590.2737884521484,"z":"813dcd9a.d3bce","wires":[]},{"id":"fd8c66f.8374618","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1460.2262153625488,"y":589.4166898727417,"z":"813dcd9a.d3bce","wires":[["f6d7f132.e76b98"]]},{"id":"2367cfdb.f8a1","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2424.083469390869,"y":559.4166975021362,"z":"813dcd9a.d3bce","wires":[[]]},{"id":"e6e6b312.9ff66","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":912.0356597900391,"y":848.4643956422806,"z":"813dcd9a.d3bce","wires":[["c9758edd.27c358"]]},{"id":"aab18dd2.ccd71","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.src-network\">\n","comments":"","outputs":1,"x":635.234001159668,"y":859.7109127044678,"z":"813dcd9a.d3bce","wires":[["4ad4f4bf.b880f4","e6e6b312.9ff66","1feeeaa4.ceb4fd"]]},{"id":"4ad4f4bf.b880f4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":904.7577667236328,"y":882.9489995241165,"z":"813dcd9a.d3bce","wires":[["c9758edd.27c358"]]},{"id":"c9758edd.27c358","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`'Error retrieving source network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`\" />","comments":"","x":1056.8687286376953,"y":879.1712285280228,"z":"813dcd9a.d3bce","wires":[]},{"id":"1feeeaa4.ceb4fd","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":910.0357208251953,"y":914.4643956422806,"z":"813dcd9a.d3bce","wires":[["e7887ed9.ffdb8"]]},{"id":"e7887ed9.ffdb8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1062.7022857666016,"y":912.7977238893509,"z":"813dcd9a.d3bce","wires":[[]]},{"id":"12c0c74b.daf7b1","type":"comment","name":"GET source network from AAI","info":"","comments":"","x":613.4642181396484,"y":828.4643898010254,"z":"813dcd9a.d3bce","wires":[]},{"id":"b90ed216.18a428","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":929.75,"y":1112.1787095069885,"z":"813dcd9a.d3bce","wires":[["b83d895b.4f291"]]},{"id":"7fbcf301.da9274","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.dest-network\">\n","comments":"","outputs":1,"x":658.3769226074219,"y":1119.710970401764,"z":"813dcd9a.d3bce","wires":[["b8838c73.a36ad8","b90ed216.18a428","389164df.893924"]]},{"id":"b8838c73.a36ad8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":922.4721069335938,"y":1146.6633133888245,"z":"813dcd9a.d3bce","wires":[["b83d895b.4f291"]]},{"id":"b83d895b.4f291","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`'Error retrieving destination network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`\" />","comments":"","x":1074.5830688476562,"y":1142.8855423927307,"z":"813dcd9a.d3bce","wires":[]},{"id":"389164df.893924","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":932.3215103149414,"y":1181.0357780456543,"z":"813dcd9a.d3bce","wires":[["4306a8fb.a6b5e8"]]},{"id":"4306a8fb.a6b5e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1084.9880752563477,"y":1179.3691062927246,"z":"813dcd9a.d3bce","wires":[[]]},{"id":"7d0a4ab3.6c586c","type":"comment","name":"GET dest network from AAI","info":"","comments":"","x":631.1785430908203,"y":1087.8929624557495,"z":"813dcd9a.d3bce","wires":[]},{"id":"b9d822a8.efbda8","type":"set","name":"set policy fq-name","xml":"<set>\n<parameter name='tmp.fq-name' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name` \" />\n","comments":"","x":584.1786270141602,"y":905.6071510314941,"z":"813dcd9a.d3bce","wires":[]},{"id":"d1f0b04b.3903a8","type":"set","name":"set cloud-region-id for input to contrail","xml":"<set>\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n","comments":"","x":646.1733093261719,"y":939.6969985961914,"z":"813dcd9a.d3bce","wires":[]},{"id":"654c455d.66bcbc","type":"execute","name":"execute Contrail API apply network policy to source network","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='apply' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.contrail-fq-name`' />\n<parameter name='contrail-virtual-network-id' value='`$aai.src-network.contrail-network-fqdn`' />\n\n","comments":"","outputs":1,"x":722.3638305664062,"y":1012.6971964836121,"z":"813dcd9a.d3bce","wires":[["773f5c52.d9a844","65423029.2aa448"]]},{"id":"773f5c52.d9a844","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1078.0303268432617,"y":1013.1254234313965,"z":"813dcd9a.d3bce","wires":[["6efba2cc.644a4c"]]},{"id":"65423029.2aa448","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1076.1256484985352,"y":1046.1253631971776,"z":"813dcd9a.d3bce","wires":[["f8269b33.8f2818"]]},{"id":"f8269b33.8f2818","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Failed to apply policy in Contrail to source network\" />\n","comments":"","x":1236.030418395996,"y":1045.4587297439575,"z":"813dcd9a.d3bce","wires":[]},{"id":"6efba2cc.644a4c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1230.2208099365234,"y":1013.792148437351,"z":"813dcd9a.d3bce","wires":[[]]},{"id":"e1945769.4b158","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.`\" />\n\n\n\n","comments":"","x":594.75,"y":624.75,"z":"813dcd9a.d3bce","wires":[]},{"id":"c88e7d42.8dec2","type":"switchNode","name":"switch source-network.network-id","xml":"<switch test='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`'>\n\n","comments":"","outputs":1,"x":638.75,"y":784.75,"z":"813dcd9a.d3bce","wires":[["9f744453.f73d38","731c0d32.4efde4"]]},{"id":"9f744453.f73d38","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":994.7502174377441,"y":783.4163794517517,"z":"813dcd9a.d3bce","wires":[["8990ad.edf7ff5"]]},{"id":"731c0d32.4efde4","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":990.4170341491699,"y":746.4161796569824,"z":"813dcd9a.d3bce","wires":[["ee9e549.5240d28"]]},{"id":"bdbbd6c9.1a2c2","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1386.5756530761719,"y":783.4322066307068,"z":"813dcd9a.d3bce","wires":[["b140a749.4fc48","46a1cf55.e7ba18"]]},{"id":"b140a749.4fc48","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1675.5756530761719,"y":785.432267665863,"z":"813dcd9a.d3bce","wires":[["2aaebe6b.9c4f0a"]]},{"id":"46a1cf55.e7ba18","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1655.5756530761719,"y":820.432267665863,"z":"813dcd9a.d3bce","wires":[["2365445.39bcbbc"]]},{"id":"8990ad.edf7ff5","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1128.861473083496,"y":783.8607840538025,"z":"813dcd9a.d3bce","wires":[["bdbbd6c9.1a2c2"]]},{"id":"ee9e549.5240d28","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Error activating contrail route.  Source network not found\" />\n","comments":"","x":1144.5504989624023,"y":747.0830821990967,"z":"813dcd9a.d3bce","wires":[]},{"id":"5a5383e9.72c19c","type":"comment","name":"Find tenant id/cloud region from source network","info":"","comments":"","x":676.1503219604492,"y":751.4163160324097,"z":"813dcd9a.d3bce","wires":[]},{"id":"70cd42d4.2890fc","type":"for","name":"for nidx..service-data.networks.network[]","xml":"<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":2118.7500610351562,"y":820.7500228881836,"z":"813dcd9a.d3bce","wires":[["f4807d03.933b48"]]},{"id":"2365445.39bcbbc","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1844.7341003417969,"y":820.8760228157043,"z":"813dcd9a.d3bce","wires":[["70cd42d4.2890fc"]]},{"id":"2aaebe6b.9c4f0a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Error activating contrail route.  Source network not found\" />\n","comments":"","x":1857.2388000488281,"y":785.3055934906006,"z":"813dcd9a.d3bce","wires":[]},{"id":"f4807d03.933b48","type":"switchNode","name":"switch networkid found","xml":"<switch test=\"`$service-data.networks.network[$nidx].network-id == $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`\">\n\n","comments":"","outputs":1,"x":2411.3048706054688,"y":817.6391496658325,"z":"813dcd9a.d3bce","wires":[["436eb069.fa0778","4fbc2bc4.af96fc"]]},{"id":"13f4d129.adecdf","type":"set","name":"set cloud region id","xml":"<set>\n<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />\n\n\n","comments":"","x":2993.9715118408203,"y":818.6392183303833,"z":"813dcd9a.d3bce","wires":[]},{"id":"a30719a6.edc868","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2761.0379848480225,"y":820.6391382217407,"z":"813dcd9a.d3bce","wires":[["13f4d129.adecdf"]]},{"id":"436eb069.fa0778","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2605.571361541748,"y":820.6390008926392,"z":"813dcd9a.d3bce","wires":[["a30719a6.edc868"]]},{"id":"4fbc2bc4.af96fc","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2606.3709716796875,"y":858.6390037536621,"z":"813dcd9a.d3bce","wires":[["387271c4.dfcf4e"]]},{"id":"387271c4.dfcf4e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Error activating contrail route.  Source network not found\" />\n","comments":"","x":2784.3711280822754,"y":858.6390695571899,"z":"813dcd9a.d3bce","wires":[]},{"id":"14b22c6c.fcabfc","type":"comment","name":"Apply the policy to source network","info":"","comments":"","x":640.7500152587891,"y":980.7500286102295,"z":"813dcd9a.d3bce","wires":[]},{"id":"b00f0fb6.47e598","type":"execute","name":"execute Contrail API apply network policy to destination network","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='apply' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.contrail-fq-name`' />\n<parameter name='contrail-virtual-network-id' value='`$aai.dest-network.contrail-network-fqdn`' />\n\n","comments":"","outputs":1,"x":746.7500610351562,"y":1264.750036239624,"z":"813dcd9a.d3bce","wires":[["c55c7ba4.af1c78","6f74bbcd.1e8a04"]]},{"id":"c55c7ba4.af1c78","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1082.4164962768555,"y":1265.1782269477844,"z":"813dcd9a.d3bce","wires":[["31c3a18d.c35b96"]]},{"id":"6f74bbcd.1e8a04","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1080.511817932129,"y":1298.1781667135656,"z":"813dcd9a.d3bce","wires":[["b857d4cd.98af18"]]},{"id":"b857d4cd.98af18","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Failed to apply policy in Contrail to source network\" />\n","comments":"","x":1240.4165878295898,"y":1297.5115332603455,"z":"813dcd9a.d3bce","wires":[]},{"id":"31c3a18d.c35b96","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1234.6069793701172,"y":1265.844951953739,"z":"813dcd9a.d3bce","wires":[[]]},{"id":"f17083c0.fd25f8","type":"comment","name":"Apply the policy to dest network","info":"","comments":"","x":645.1361846923828,"y":1232.8028321266174,"z":"813dcd9a.d3bce","wires":[]},{"id":"d76d4a4a.711878","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":555.7501792907715,"y":2140.7266874313354,"z":"813dcd9a.d3bce","wires":[]},{"id":"4863a49a.47232c","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='contrail-route-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $contrail-route-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":584.5040855407715,"y":2103.1824808120728,"z":"813dcd9a.d3bce","wires":[]},{"id":"4f9959ff.99f5d","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Active' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":616.1709213256836,"y":1962.2300510406494,"z":"813dcd9a.d3bce","wires":[]},{"id":"212281cc.a674ae","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":644.2793960571289,"y":2036.279543876648,"z":"813dcd9a.d3bce","wires":[["d4e42d2d.79d87","8d96d215.4633c","51423045.023d"]]},{"id":"d4e42d2d.79d87","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":914.5874137878418,"y":2089.2777446731925,"z":"813dcd9a.d3bce","wires":[["59c58cd2.31ad04"]]},{"id":"8d96d215.4633c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":905.5874633789062,"y":2057.777770422399,"z":"813dcd9a.d3bce","wires":[["59c58cd2.31ad04"]]},{"id":"51423045.023d","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":909.3375015258789,"y":2028.1348752975464,"z":"813dcd9a.d3bce","wires":[["b28af593.fdcef8"]]},{"id":"59c58cd2.31ad04","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource\" />\n","comments":"","x":1075.337501525879,"y":2058.527794264257,"z":"813dcd9a.d3bce","wires":[]},{"id":"b28af593.fdcef8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1050.9934692382812,"y":2024.3270444869995,"z":"813dcd9a.d3bce","wires":[[]]},{"id":"d2d48767.60437","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":566.9935150146484,"y":1928.6601829528809,"z":"813dcd9a.d3bce","wires":[[]]},{"id":"f8def33f.3a491","type":"comment","name":"Need to rollback aai here","info":"","comments":"","x":1301.416763305664,"y":2057.84538936615,"z":"813dcd9a.d3bce","wires":[]},{"id":"60c83994.dfd038","type":"comment","name":"Create  network policy in AAI","info":"","comments":"","x":600.7500381469727,"y":1877.8452768325806,"z":"813dcd9a.d3bce","wires":[]},{"id":"950cc6c.99f39b8","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n        pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"operational-status\" value=\"in-service-path\" />\n","comments":"","outputs":1,"x":605.3691101074219,"y":1839.7978992462158,"z":"813dcd9a.d3bce","wires":[["efbf0aed.e07788","115125da.13114a"]]},{"id":"efbf0aed.e07788","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":873.1310272216797,"y":1817.0359525680542,"z":"813dcd9a.d3bce","wires":[["cc34374d.c82f98"]]},{"id":"115125da.13114a","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":878.4404563903809,"y":1852.607370376587,"z":"813dcd9a.d3bce","wires":[["cc34374d.c82f98"]]},{"id":"cc34374d.c82f98","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":1088.2262420654297,"y":1818.6549968719482,"z":"813dcd9a.d3bce","wires":[]},{"id":"eb7af3d8.e2e8d8","type":"comment","name":"Update AAI AR","info":"","comments":"","x":558.7119522094727,"y":1799.226222038269,"z":"813dcd9a.d3bce","wires":[]},{"id":"c5899b4c.6cd78","type":"comment","name":"Update network policy in AAI - relationship to networks","info":"","comments":"","x":708.7501220703125,"y":1504.7500410079956,"z":"813dcd9a.d3bce","wires":[]},{"id":"88a7580.32ec5a8","type":"save","name":"save AnAI - network-policy relationship to source and destination network","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"network-policy:relationship-list\" \n\tkey=\"network-policy.network-policy-id = $ar-assignments.contrail-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`tmp.AnAI-src.related-link`\" />\n<parameter name=\"relationship-list.relationship[1].related-to\" value=\"l3-network\" />\n<parameter name=\"relationship-list.relationship[1].related-link\" value=\"`tmp.AnAI-dest.related-link`\" />\n\n\n","comments":"","outputs":1,"x":770.1270179748535,"y":1541.8175249099731,"z":"813dcd9a.d3bce","wires":[["e5a67b45.20b1c","b871af24.755df8"]]},{"id":"ae7fe4ff.4e4498","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Failed to save network policy in AAI\" />\n","comments":"","x":1414.4725036621094,"y":1538.0994877815247,"z":"813dcd9a.d3bce","wires":[]},{"id":"e5a67b45.20b1c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1185.9011116027832,"y":1541.115225315094,"z":"813dcd9a.d3bce","wires":[["ae7fe4ff.4e4498"]]},{"id":"b871af24.755df8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1189.7106094360352,"y":1569.5916419029236,"z":"813dcd9a.d3bce","wires":[["ae7fe4ff.4e4498"]]},{"id":"bf22b626.ac2cc","type":"save","name":"get related-link data for source network","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\nresource=\"related-link\"\nkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id\"\nlocal-only=\"true\"\npfx=\"tmp.AnAI-src\">\n\n\n\n","comments":"","outputs":1,"x":674.7500152587891,"y":1338.7500371932983,"z":"813dcd9a.d3bce","wires":[["ab369e17.3ba35","332634da.627144"]]},{"id":"77aaf3ff.eeeb7c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Failed to get related link for l3-network in AAI\" />\n","comments":"","x":1318.75,"y":1344.75,"z":"813dcd9a.d3bce","wires":[]},{"id":"ab369e17.3ba35","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1090.1786079406738,"y":1343.7657375335693,"z":"813dcd9a.d3bce","wires":[["77aaf3ff.eeeb7c"]]},{"id":"332634da.627144","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1093.9881057739258,"y":1373.242154121399,"z":"813dcd9a.d3bce","wires":[["77aaf3ff.eeeb7c"]]},{"id":"7e19f3fd.32b57c","type":"save","name":"get related-link data for dest network","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\nresource=\"related-link\"\nkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id\"\nlocal-only=\"true\"\npfx=\"tmp.AnAI-dest\">\n\n\n\n","comments":"","outputs":1,"x":670.75,"y":1412.75,"z":"813dcd9a.d3bce","wires":[["6d15b228.6d5114","4640b9d8.04f298"]]},{"id":"ea538b84.fbe59","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Failed to get related link for l3-network in AAI\" />\n","comments":"","x":1112.7500381469727,"y":1422.7500410079956,"z":"813dcd9a.d3bce","wires":[]},{"id":"6d15b228.6d5114","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":930.1786422729492,"y":1409.7657642364502,"z":"813dcd9a.d3bce","wires":[["ea538b84.fbe59"]]},{"id":"4640b9d8.04f298","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":935.9881210327148,"y":1439.2422285079956,"z":"813dcd9a.d3bce","wires":[["ea538b84.fbe59"]]}]