aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml
diff options
context:
space:
mode:
authorbrunomilitzer <bruno.militzer@est.tech>2021-07-08 12:44:06 +0100
committerbrunomilitzer <bruno.militzer@est.tech>2021-07-08 12:44:13 +0100
commit22595f692c26882a4775221a67d8e76fc6bafd09 (patch)
treea812f67ab4c50412557c8aee858082be8978f245 /runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml
parent22a9e7eed2eaed9846cdf07cecb712764b23b651 (diff)
Add Camel Endpoint ControlLoop Instantiation
Added Camel Endpoint so that it connects with the ControlLoop Rest endpoint to create a new instantiation. Issue-ID: POLICY-3436 Change-Id: Idf3bda8a6226f57836d887f9d7a7b66327446858 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 d2bf39b16..b7da4a743 100644
--- a/runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml
+++ b/runtime/src/main/resources/clds/camel/routes/controlloop-flows.xml
@@ -79,4 +79,29 @@
</doFinally>
</doTry>
</route>
+ <route id="post-tosca-instantiation">
+ <from uri="direct:post-tosca-instantiation"/>
+ <doTry>
+ <log loggingLevel="INFO"
+ message="Create the tosca instantiation service"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=invokeLog('Controlloop', 'Create the tosca instantiation service')"/>
+ <setHeader name="CamelHttpMethod">
+ <constant>POST</constant>
+ </setHeader>
+ <setHeader name="Content-Type">
+ <constant>application/json</constant>
+ </setHeader>
+ <log loggingLevel="INFO"
+ message="Endpoint to send Tosca Instantiation Service: {{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>