aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml
diff options
context:
space:
mode:
authorbrunomilitzer <bruno.militzer@est.tech>2021-06-18 16:11:11 +0100
committerBruno Militzer <bruno.militzer@est.tech>2021-06-22 16:25:31 +0000
commiteaefb9f5c24a830265d00972dce334f6565e83dc (patch)
tree19e3d23856cdce49bbbb914f8d30effac563c183 /runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml
parentdf2d3298e9881410dff5547e0ba9850135d63d5c (diff)
Added Camel Endpoint for Tosca Instantiation
Endpoint redirects GET to runtime instantiation Issue-ID: POLICY-3357 Change-Id: Idf733c2803be2f6ab5cc681d583c1c6b46b2ce96 Signed-off-by: brunomilitzer <bruno.militzer@est.tech>
Diffstat (limited to 'runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml')
-rw-r--r--runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml25
1 files changed, 25 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 0641b326e..009e00fca 100644
--- a/runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml
+++ b/runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml
@@ -52,4 +52,29 @@
</doFinally>
</doTry>
</route>
+ <route id="get-tosca-instantiation">
+ <from uri="direct:get-tosca-instantiation"/>
+ <doTry>
+ <log loggingLevel="INFO"
+ message="Getting the Tosca instantiation"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('ControlLoop', 'Getting the Tosca instantiation')"/>
+ <setHeader name="CamelHttpMethod">
+ <constant>GET</constant>
+ </setHeader>
+ <setHeader name="Content-Type">
+ <constant>application/json</constant>
+ </setHeader>
+ <log loggingLevel="INFO"
+ message="Endpoint to get Tosca Instantiation: {{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/instantiation"></log>
+ <toD
+ uri="{{clamp.config.controlloop.runtime.url}}/onap/controlloop/v2/instantiation?bridgeEndpoint=true&amp;useSystemProperties=true&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;authMethod=Basic&amp;authUsername={{clamp.config.controlloop.runtime.userName}}&amp;authPassword={{clamp.config.controlloop.runtime.password}}&amp;authenticationPreemptive=true&amp;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>