diff options
author | 2021-06-15 08:35:43 +0000 | |
---|---|---|
committer | 2021-06-15 08:35:43 +0000 | |
commit | 1a0a37f826f5d301bccd8ad22c23341a9dbe531a (patch) | |
tree | 27f2dbad9503f834870c366caf92d648f8690f52 /runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml | |
parent | 7f89803244315af8dd605380d4a6d6586c3d870b (diff) | |
parent | ee7faff4b6e292237ccdac5e19cd0b438ea91e52 (diff) |
Merge "Create camel endpoint to get tosca from runtime"
Diffstat (limited to 'runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml')
-rw-r--r-- | runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml | 38 |
1 files changed, 38 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 4659a90bf..6a5da8710 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 @@ -1461,6 +1461,44 @@ </route> </post> + <get uri="/v2/toscaControlLoop/getToscaTemplate" outType="java.lang.String" bindingMode="off" produces="application/json"> + <route> + <removeHeaders pattern="*" + excludePattern="name|version"/> + <doTry> + <to + uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Tosca Service Template ')"/> + <to + uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')"/> + <setHeader name="Content-Type"> + <constant>application/json</constant> + </setHeader> + <setProperty name="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">true</simple> + </setProperty> + <to uri="direct:get-service-template"/> + <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="GET Tosca Service Template JSON request failed: ${exception.stacktrace}"/> + <setHeader name="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET Tosca Service Template JSON FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </get> + <get uri="/v2/clampInformation" outType="org.onap.policy.clamp.clds.model.ClampInformation" produces="application/json"> <route> |