1
|
[{"id":"becd7f46.fe2bf","type":"dgstart","name":"DGSTART","outputs":1,"x":128.75,"y":27.5,"z":"e569e14b.d5e55","wires":[["adc37c50.19098"]]},{"id":"adc37c50.19098","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":274.9880828857422,"y":102.45239353179932,"z":"e569e14b.d5e55","wires":[["88d121bb.cdd29"]]},{"id":"88d121bb.cdd29","type":"method","name":"contrail-route-topology-operation-delete","xml":"<method rpc='contrail-route-topology-operation-delete' mode='sync'>\n","comments":"","outputs":1,"x":354.9048500061035,"y":171.6904420852661,"z":"e569e14b.d5e55","wires":[["60ab3b30.b86e34"]]},{"id":"60ab3b30.b86e34","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":263.2261848449707,"y":315.023784160614,"z":"e569e14b.d5e55","wires":[["22819c80.b5e484","445b52e8.7f835c","4ac8649d.ada16c","62ed76ff.3c67b8","354e0921.5c5ed6","e3e3d9e6.687068","f049140a.554d68","b627ce5a.c2954","d72864d2.c3f998","79f2ba4.25f5344","a4812fb4.cdeec","1bce9c6e.93a654","c7759fb6.6c31d","6689456.39a4cbc","d86a7f33.843fa","4706a986.175c68","9aa992b8.2845a"]]},{"id":"445b52e8.7f835c","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":530.4644355773926,"y":1507.0481815338135,"z":"e569e14b.d5e55","wires":[]},{"id":"22819c80.b5e484","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":559.2183418273926,"y":1469.5039749145508,"z":"e569e14b.d5e55","wires":[]},{"id":"79f2ba4.25f5344","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingDelete' />\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":594.2184982299805,"y":1348.5514640808105,"z":"e569e14b.d5e55","wires":[]},{"id":"62ed76ff.3c67b8","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":525.4880561828613,"y":288.8333215713501,"z":"e569e14b.d5e55","wires":[]},{"id":"4ac8649d.ada16c","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<parameter name='tmp.ar.sz-vnf-id' value='`$contrail-route-topology-operation-input.allotted-resource-data.security-zone-topology.security-zone-assignments.security-zone-vnf-id`' />\n\n\n","comments":"","x":572.7473182678223,"y":255.0925874710083,"z":"e569e14b.d5e55","wires":[]},{"id":"354e0921.5c5ed6","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":595.7434158325195,"y":324.7315502166748,"z":"e569e14b.d5e55","wires":[[]]},{"id":"f049140a.554d68","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":602.2687454223633,"y":492.959508895874,"z":"e569e14b.d5e55","wires":[["69cfc505.7f3bfc","1595a59f.8ba24a"]]},{"id":"e3e3d9e6.687068","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":559.8148460388184,"y":384.51722526550293,"z":"e569e14b.d5e55","wires":[[]]},{"id":"69cfc505.7f3bfc","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":847.5648498535156,"y":493.7673225402832,"z":"e569e14b.d5e55","wires":[["3d3e16bd.d3cd1a"]]},{"id":"b627ce5a.c2954","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":622.3269729614258,"y":1422.600956916809,"z":"e569e14b.d5e55","wires":[["bb0a2810.ed8a78","c90a1d4a.3f87a","fea853dd.97a09"]]},{"id":"bb0a2810.ed8a78","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":892.6349906921387,"y":1475.5991577133536,"z":"e569e14b.d5e55","wires":[["d905f0c9.5808e"]]},{"id":"c90a1d4a.3f87a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":883.6350402832031,"y":1444.0991834625602,"z":"e569e14b.d5e55","wires":[["d905f0c9.5808e"]]},{"id":"fea853dd.97a09","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":887.3850784301758,"y":1414.4562883377075,"z":"e569e14b.d5e55","wires":[["2d2d87e.03f6078"]]},{"id":"d905f0c9.5808e","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":1053.3850784301758,"y":1444.849207304418,"z":"e569e14b.d5e55","wires":[]},{"id":"3d3e16bd.d3cd1a","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1016.5648536682129,"y":492.2672233581543,"z":"e569e14b.d5e55","wires":[["9e65c440.041d18"]]},{"id":"9e65c440.041d18","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1227.4220962524414,"y":491.8863525390625,"z":"e569e14b.d5e55","wires":[["4d39ed9a.01efb4","a3995ce4.1f05c"]]},{"id":"4d39ed9a.01efb4","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1416.7554016113281,"y":491.8863105773926,"z":"e569e14b.d5e55","wires":[["5e4bfa25.12c6e4"]]},{"id":"d59088ab.eae808","type":"set","name":"set ar from get","xml":"<set>\n<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />\n","comments":"","x":1889.9462203979492,"y":455.12452602386475,"z":"e569e14b.d5e55","wires":[]},{"id":"5e4bfa25.12c6e4","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1601.279291152954,"y":488.7911443710327,"z":"e569e14b.d5e55","wires":[["d59088ab.eae808","43821273.52747c","4a61db6.87e5124","7d01f23a.bec1cc"]]},{"id":"43821273.52747c","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":1897.9461479187012,"y":519.219669342041,"z":"e569e14b.d5e55","wires":[]},{"id":"9fb35462.f52a18","type":"comment","name":"GET security-zone-allotted-resource from mdsal","info":"","comments":"","x":615.5647926330566,"y":460.2672119140625,"z":"e569e14b.d5e55","wires":[]},{"id":"7d01f23a.bec1cc","type":"switchNode","name":"switch order-status","xml":"<switch test='`$ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1905.946002960205,"y":486.1244812011719,"z":"e569e14b.d5e55","wires":[["eac06920.e5b678","b310637f.02fbd"]]},{"id":"eac06920.e5b678","type":"outcome","name":"outcome PendingDelete","xml":"<outcome value='PendingDelete'>\n","comments":"","outputs":1,"x":2119.2125549316406,"y":468.7911968231201,"z":"e569e14b.d5e55","wires":[["febe9e04.e9e54"]]},{"id":"b310637f.02fbd","type":"outcome","name":"outcome Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2141.5936737060547,"y":500.55319023132324,"z":"e569e14b.d5e55","wires":[["7ce0b7e4.ca1208"]]},{"id":"7ce0b7e4.ca1208","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 + '.'`\" />\n","comments":"","x":2382.212423324585,"y":503.4577798843384,"z":"e569e14b.d5e55","wires":[]},{"id":"4a61db6.87e5124","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":1977.8032722473145,"y":421.9340181350708,"z":"e569e14b.d5e55","wires":[]},{"id":"c977b987.7343b8","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":530.7076530456543,"y":354.12435245513916,"z":"e569e14b.d5e55","wires":[]},{"id":"2d2d87e.03f6078","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1029.0410461425781,"y":1410.6484575271606,"z":"e569e14b.d5e55","wires":[[]]},{"id":"d72864d2.c3f998","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":545.0410919189453,"y":1314.981595993042,"z":"e569e14b.d5e55","wires":[[]]},{"id":"9bed6f70.40b63","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":1600.416997909546,"y":604.8333854675293,"z":"e569e14b.d5e55","wires":[]},{"id":"1595a59f.8ba24a","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":839.4166526794434,"y":528.8334074020386,"z":"e569e14b.d5e55","wires":[["d10e959d.f1af08"]]},{"id":"d10e959d.f1af08","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1019.4166030883789,"y":529.4999580383301,"z":"e569e14b.d5e55","wires":[["9bed6f70.40b63"]]},{"id":"a4812fb4.cdeec","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":509.4165802001953,"y":522.8808951377869,"z":"e569e14b.d5e55","wires":[]},{"id":"a3995ce4.1f05c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1405.0833549499512,"y":529.1666707992554,"z":"e569e14b.d5e55","wires":[["9bed6f70.40b63"]]},{"id":"febe9e04.e9e54","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2366.083469390869,"y":469.16669750213623,"z":"e569e14b.d5e55","wires":[[]]},{"id":"91ea6f99.223eb","type":"comment","name":"Need to rollback aai here","info":"","comments":"","x":1279.464340209961,"y":1444.1668024063108,"z":"e569e14b.d5e55","wires":[]},{"id":"6ac1fe37.5f523","type":"comment","name":"Create network policy in AAI","info":"","comments":"","x":578.7976150512695,"y":1264.1666898727417,"z":"e569e14b.d5e55","wires":[]},{"id":"1bce9c6e.93a654","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=\"null\" />\n","comments":"","outputs":1,"x":572.4642715454102,"y":1202.1667737960815,"z":"e569e14b.d5e55","wires":[["67708d06.981c54","b5575696.f84148"]]},{"id":"67708d06.981c54","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":828.226203918457,"y":1179.404948234558,"z":"e569e14b.d5e55","wires":[["d0e7d313.62e1c"]]},{"id":"b5575696.f84148","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":833.5356330871582,"y":1214.9763660430908,"z":"e569e14b.d5e55","wires":[["d0e7d313.62e1c"]]},{"id":"d0e7d313.62e1c","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":1043.321418762207,"y":1181.0239925384521,"z":"e569e14b.d5e55","wires":[]},{"id":"a58ba31a.f94","type":"comment","name":"Update AAI AR","info":"","comments":"","x":535.80712890625,"y":1165.595217704773,"z":"e569e14b.d5e55","wires":[]},{"id":"c7759fb6.6c31d","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":538.2262420654297,"y":553.4048233032227,"z":"e569e14b.d5e55","wires":[]},{"id":"6689456.39a4cbc","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":591.7500228881836,"y":738.0000433921814,"z":"e569e14b.d5e55","wires":[["515c68f.6a6a098","894918d6.e832c8"]]},{"id":"515c68f.6a6a098","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":939.7502098083496,"y":734.666512966156,"z":"e569e14b.d5e55","wires":[["f2deddaa.598f2"]]},{"id":"894918d6.e832c8","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":950.4170837402344,"y":682.6663026809692,"z":"e569e14b.d5e55","wires":[["93707edc.f30ee"]]},{"id":"f99240c7.f4772","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":2075.194984436035,"y":774.4442907571793,"z":"e569e14b.d5e55","wires":[["da8b3e4d.18624"]]},{"id":"96d519a6.4763b8","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1331.5756454467773,"y":734.6823401451111,"z":"e569e14b.d5e55","wires":[["2e19de27.056642","bcf381b3.c76e"]]},{"id":"2e19de27.056642","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1620.5756454467773,"y":736.6824011802673,"z":"e569e14b.d5e55","wires":[["7c9aa9bb.103b58"]]},{"id":"bcf381b3.c76e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1600.5756454467773,"y":771.6824011802673,"z":"e569e14b.d5e55","wires":[["ed771c46.afda1"]]},{"id":"ed771c46.afda1","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1805.1789474487305,"y":775.5702749490738,"z":"e569e14b.d5e55","wires":[["f99240c7.f4772"]]},{"id":"f2deddaa.598f2","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1073.8614654541016,"y":735.1109175682068,"z":"e569e14b.d5e55","wires":[["96d519a6.4763b8"]]},{"id":"93707edc.f30ee","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 assigning contrail route. Source network not found\" />\n","comments":"","x":1104.5504913330078,"y":681.6664979457855,"z":"e569e14b.d5e55","wires":[]},{"id":"7c9aa9bb.103b58","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 assigning contrail route. Source network not found\" />\n","comments":"","x":1813.683723449707,"y":736.9998613595963,"z":"e569e14b.d5e55","wires":[]},{"id":"744200d3.b7b6c","type":"comment","name":"Find tenant id/cloud region from source network","info":"","comments":"","x":621.1503143310547,"y":702.666449546814,"z":"e569e14b.d5e55","wires":[]},{"id":"da8b3e4d.18624","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":2367.7497940063477,"y":771.3334175348282,"z":"e569e14b.d5e55","wires":[["2c78c682.af625a","a918ee27.d0f7"]]},{"id":"8003625a.45bf9","type":"set","name":"set tmp vals","xml":"<set>\n<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />\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":2922.416702270508,"y":758.8333740234375,"z":"e569e14b.d5e55","wires":[]},{"id":"ef7f7f6c.34425","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2732.483144760132,"y":771.8333854675293,"z":"e569e14b.d5e55","wires":[["8003625a.45bf9","5c078955.678798"]]},{"id":"2c78c682.af625a","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2577.0165214538574,"y":771.8332481384277,"z":"e569e14b.d5e55","wires":[["ef7f7f6c.34425"]]},{"id":"a918ee27.d0f7","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2577.816131591797,"y":809.8332509994507,"z":"e569e14b.d5e55","wires":[["510901ad.81fce"]]},{"id":"510901ad.81fce","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 assigning contrail route. Source network not found\" />\n","comments":"","x":2755.8162879943848,"y":809.8333168029785,"z":"e569e14b.d5e55","wires":[]},{"id":"5c078955.678798","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND\n\t\t tenant.tenant-id = $tmp.ar.tenant-id\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":2944.8832473754883,"y":794.8330698013306,"z":"e569e14b.d5e55","wires":[["a025d6e3.0cf328","2b3e07b3.856838","80bbe92b.0ca8c8"]]},{"id":"a025d6e3.0cf328","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3165.7446365356445,"y":787.4441843032837,"z":"e569e14b.d5e55","wires":[["366a9169.e07f0e"]]},{"id":"2b3e07b3.856838","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3161.077663421631,"y":820.7774982452393,"z":"e569e14b.d5e55","wires":[["366a9169.e07f0e"]]},{"id":"366a9169.e07f0e","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=\"Tenant not found in AAI\" />\n\n","comments":"","x":3335.2535858154297,"y":808.8330574035645,"z":"e569e14b.d5e55","wires":[]},{"id":"80bbe92b.0ca8c8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3161.2536697387695,"y":755.8701486587524,"z":"e569e14b.d5e55","wires":[["fdc8673.8e4fe98"]]},{"id":"fdc8673.8e4fe98","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3341.2536697387695,"y":753.8701486587524,"z":"e569e14b.d5e55","wires":[["dcb00324.4f521"]]},{"id":"dcb00324.4f521","type":"set","name":"set tenant name","xml":"<set>\n<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />\n\n\n","comments":"","x":3528.2167739868164,"y":751.4998903274536,"z":"e569e14b.d5e55","wires":[]},{"id":"17163470.0781cc","type":"comment","name":"Call contrail api here","info":"","comments":"","x":548.0356826782227,"y":794.1667237281799,"z":"e569e14b.d5e55","wires":[]},{"id":"d86a7f33.843fa","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='`$tmp.ar.cloud-region-id`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n\n","comments":"","outputs":1,"x":631.1547546386719,"y":831.8097562789917,"z":"e569e14b.d5e55","wires":[["dbc93224.c778b","d259410.5f4e0c"]]},{"id":"dbc93224.c778b","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":912.5356903076172,"y":799.952121887356,"z":"e569e14b.d5e55","wires":[["30e0725f.31f38e"]]},{"id":"d259410.5f4e0c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":910.6310119628906,"y":832.9520616531372,"z":"e569e14b.d5e55","wires":[["8d871542.3bdde8"]]},{"id":"8d871542.3bdde8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to create policy in Contrail\" />\n","comments":"","x":1070.5357818603516,"y":832.2854281999171,"z":"e569e14b.d5e55","wires":[]},{"id":"30e0725f.31f38e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1064.726173400879,"y":800.6188468933105,"z":"e569e14b.d5e55","wires":[[]]},{"id":"bc9dc5ef.cc95b8","type":"comment","name":"Delete network policy in AAI","info":"","comments":"","x":549.25,"y":1020.5,"z":"e569e14b.d5e55","wires":[]},{"id":"4706a986.175c68","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":564.6268844604492,"y":1057.5675649642944,"z":"e569e14b.d5e55","wires":[["40afbc3e.f273b4","b25dd908.c3dfd8"]]},{"id":"89d7c3b.8b4d84","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":1036.9723930358887,"y":1047.849178314209,"z":"e569e14b.d5e55","wires":[]},{"id":"40afbc3e.f273b4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":808.4010009765625,"y":1046.8649158477783,"z":"e569e14b.d5e55","wires":[["89d7c3b.8b4d84"]]},{"id":"b25dd908.c3dfd8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":812.2104988098145,"y":1076.341332435608,"z":"e569e14b.d5e55","wires":[["89d7c3b.8b4d84"]]},{"id":"9aa992b8.2845a","type":"call","name":"call policy-manager-delete-policy","xml":"<call module='GENERIC-RESOURCE-API' rpc='policy-manager-delete-policy' mode='sync' >\n","comments":"","outputs":1,"x":611.6666259765625,"y":918.3333129882812,"z":"e569e14b.d5e55","wires":[["e6c7cfc1.e9849","9ded72db.4afdc"]]},{"id":"e6c7cfc1.e9849","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":847.2459869384766,"y":915.6752805709839,"z":"e569e14b.d5e55","wires":[["ef5c2a2c.1e98b8"]]},{"id":"9ded72db.4afdc","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":853.2382545471191,"y":956.4763560295105,"z":"e569e14b.d5e55","wires":[["f106eb88.3f01a8"]]},{"id":"f106eb88.3f01a8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1005.9048194885254,"y":954.8096842765808,"z":"e569e14b.d5e55","wires":[[]]},{"id":"ef5c2a2c.1e98b8","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1005.9524307250977,"y":909.7620401382446,"z":"e569e14b.d5e55","wires":[[]]},{"id":"6ced15d1.6e2fdc","type":"comment","name":"Call policy mgr. continue on failure","info":"","comments":"","x":602.3332977294922,"y":886.6666030883789,"z":"e569e14b.d5e55","wires":[]}]
|