1
|
[{"id":"2b8f0645.8e4dda","type":"comment","name":"POLICY-UPDATE-NOTIFY-OPERATION","info":"","comments":"","x":538.3928527832031,"y":34.28571319580078,"z":"c4ddb531.504de8","wires":[]},{"id":"640c5bf2.e2b254","type":"dgstart","name":"DGSTART","outputs":1,"x":110.14285278320312,"y":85.03571319580078,"z":"c4ddb531.504de8","wires":[["6371d353.9eabbc"]]},{"id":"6371d353.9eabbc","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":224.46426391601562,"y":124.7023868560791,"z":"c4ddb531.504de8","wires":[["af806a5c.37c7f8"]]},{"id":"af806a5c.37c7f8","type":"method","name":"method policy-update-notify-operation","xml":"<method rpc='policy-update-notify-operation' mode='sync'>\n","comments":"","outputs":1,"x":201,"y":165.0357151031494,"z":"c4ddb531.504de8","wires":[["59ff8d7a.32d3d4"]]},{"id":"d17a989.54e5868","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=\"success\" />\n","comments":"","x":338.3810272216797,"y":578.9882106781006,"z":"c4ddb531.504de8","wires":[]},{"id":"3cfb5438.adb59c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":680.2977676391602,"y":313.80953311920166,"z":"c4ddb531.504de8","wires":[["4c9eba0e.d56fd4","bbad0a81.e6a3e8","5bf6f09a.aa2a","dadfe54.591ea18","5210aeb1.e5ac2"]]},{"id":"4c9eba0e.d56fd4","type":"execute","name":"RestapiCallnode getConfig","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.pm.getpolicy.templatefile`\" />\n <parameter name='restapiUrl' value=\"`$prop.policy-manager.url + '/pdp/api/getConfig'`\" />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='POST' />\n <parameter name='responsePrefix' value=\"policy\" /> \n <parameter name='customHttpHeaders'\n value=\"`'Authorization=Basic ' + $prop.policy-manager.authorization + ',ClientAuth=Basic ' + $prop.policy-manager.clientauth + ',Environment=' + $prop.policy-manager.environment `\" />\n","comments":"","outputs":1,"x":938.5714569091797,"y":365.7142572402954,"z":"c4ddb531.504de8","wires":[["371b8aa7.b584d6","eb8e6d2.61e729"]]},{"id":"bbad0a81.e6a3e8","type":"execute","name":"readProperties","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":904.285774230957,"y":198.57144355773926,"z":"c4ddb531.504de8","wires":[[]]},{"id":"371b8aa7.b584d6","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1145.7143020629883,"y":342.85714054107666,"z":"c4ddb531.504de8","wires":[["bc023fa9.fe4ae"]]},{"id":"bc023fa9.fe4ae","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1309.4286270141602,"y":342.78561639785767,"z":"c4ddb531.504de8","wires":[[]]},{"id":"eb8e6d2.61e729","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1141.8518409729004,"y":390.7803535461426,"z":"c4ddb531.504de8","wires":[["c447c4e0.dd61f8"]]},{"id":"c447c4e0.dd61f8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Failed to get policy from Policy Manager' />\n","comments":"","x":1306.2857246398926,"y":390.42856311798096,"z":"c4ddb531.504de8","wires":[]},{"id":"5bf6f09a.aa2a","type":"execute","name":"execute Contrail API update 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='update' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$cloud-region-id`' />\n<parameter name='update-network-policy-json' value='`$policy.config`' />","comments":"","outputs":1,"x":987.1428680419922,"y":467.14284801483154,"z":"c4ddb531.504de8","wires":[["fca9fae0.1cd838","cadf6d1d.e304e"]]},{"id":"fca9fae0.1cd838","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1240.0000457763672,"y":444.2856969833374,"z":"c4ddb531.504de8","wires":[["9b561741.693e18"]]},{"id":"9b561741.693e18","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1403.714370727539,"y":444.2141728401184,"z":"c4ddb531.504de8","wires":[[]]},{"id":"cadf6d1d.e304e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1236.1375846862793,"y":492.2089099884033,"z":"c4ddb531.504de8","wires":[["bc7e3f77.a2464"]]},{"id":"bc7e3f77.a2464","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Failed to get policy from Policy Manager' />\n","comments":"","x":1400.5714683532715,"y":491.8571195602417,"z":"c4ddb531.504de8","wires":[]},{"id":"50b08b49.336914","type":"switchNode","name":"switch update-type","xml":"<switch test='`$policy-update-notify-operation-input.update-type`'>\n","comments":"","outputs":1,"x":349.9999771118164,"y":314.2857093811035,"z":"c4ddb531.504de8","wires":[["8100e6ab.3c2318"]]},{"id":"59ff8d7a.32d3d4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":140,"y":445.714298248291,"z":"c4ddb531.504de8","wires":[["50b08b49.336914","d17a989.54e5868"]]},{"id":"8100e6ab.3c2318","type":"outcome","name":"Update","xml":"<outcome value='Update'>\n","comments":"","outputs":1,"x":523.5714454650879,"y":313.85714530944824,"z":"c4ddb531.504de8","wires":[["3cfb5438.adb59c"]]},{"id":"dadfe54.591ea18","type":"save","name":"insert to POLICY_UPDATE_NOTIFICATION","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"`$tmp.sql`\" pfx='pfx'>\n","comments":"","outputs":1,"x":992.8572158813477,"y":294.28569889068604,"z":"c4ddb531.504de8","wires":[[]]},{"id":"5210aeb1.e5ac2","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.sql' value=\"`'insert into POLICY_UPDATE_NOTIFICATION (policy_name,version_id,update_type) values ( '\n+ ' $policy-update-notify-operation-input.policy-name , $policy-update-notify-operation-input.version-id , $policy-update-notify-operation-input.update-type )'`\" />\n\n","comments":"","x":909.9999465942383,"y":245.71427249908447,"z":"c4ddb531.504de8","wires":[]}]
|