diff options
author | saul.gill <saul.gill@est.tech> | 2021-06-17 16:28:22 +0100 |
---|---|---|
committer | saul.gill <saul.gill@est.tech> | 2021-06-17 16:28:30 +0100 |
commit | 0f1803780d61b8174bce4914044f5ee5d9a0ff42 (patch) | |
tree | 13d3136f6ea7b97e8b0ddf7cba180299f46a2d7a /runtime/src/main/resources/clds/camel/routes | |
parent | 17f5d3c97e47064407452122bc6cb801e43df5f9 (diff) |
Added Camel Endpoint for Tosca Template Upload
Endpoint redirects a POST to runtime commissiong API
Tosca Service Template is written to the database
Issue-ID: POLICY-3222
Change-Id: I9ca6b0b3fdbef4bf9a182795112de5280ec7f9ff
Signed-off-by: saul.gill <saul.gill@est.tech>
Diffstat (limited to 'runtime/src/main/resources/clds/camel/routes')
-rw-r--r-- | runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml b/runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml index b1fad103b..0641b326e 100644 --- a/runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml +++ b/runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml @@ -30,4 +30,26 @@ </doFinally> </doTry> </route> + <route id="commission-service-template"> + <from uri="direct:commission-service-template"/> + <doTry> + <log loggingLevel="INFO" + message="Commissioning the tosca service template"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('Controlloop', 'Commissioning the tosca service template')"/> + <setHeader name="CamelHttpMethod"> + <constant>POST</constant> + </setHeader> + <log loggingLevel="INFO" + message="Endpoint to send Tosca Service Template: {{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/commission"></log> + <toD + uri="{{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/commission?bridgeEndpoint=true&useSystemProperties=true&mapHttpMessageHeaders=false&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.controlloop.runtime.userName}}&authPassword={{clamp.config.controlloop.runtime.password}}&authenticationPreemptive=true&connectionClose=true"/> + <convertBodyTo type="java.lang.String"/> + <doFinally> + <to uri="direct:reset-raise-http-exception-flag"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()"/> + </doFinally> + </doTry> + </route> </routes> |