diff options
author | 2021-07-08 12:44:06 +0100 | |
---|---|---|
committer | 2021-07-08 12:44:13 +0100 | |
commit | 22595f692c26882a4775221a67d8e76fc6bafd09 (patch) | |
tree | a812f67ab4c50412557c8aee858082be8978f245 /runtime/src/main/resources/clds/camel/rest | |
parent | 22a9e7eed2eaed9846cdf07cecb712764b23b651 (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/rest')
-rw-r--r-- | runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml b/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml index b3c4edbe6..d560db660 100644 --- a/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -1576,6 +1576,49 @@ </route> </get> + <post uri="/v2/toscaControlLoop/postToscaInstantiation" + type="java.lang.String" + consumes="plain/text" + outType="java.lang.String" + produces="application/json" + bindingMode="off"> + <route> + <removeHeaders pattern="*"/> + <setProperty name="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">true</simple> + </setProperty> + <setHeader name="Content-Type"> + <constant>application/json</constant> + </setHeader> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update the global properties')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/> + <to uri="direct:post-tosca-instantiation"/> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/> + <log loggingLevel="ERROR" + message="Create Tosca Instantiation Service FAILED"/> + + <setHeader name="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>Create Tosca Instantiation Service FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </post> + <get uri="/v2/clampInformation" outType="org.onap.policy.clamp.clds.model.ClampInformation" produces="application/json"> <route> |