diff options
author | sebdet <sebastien.determe@intl.att.com> | 2020-02-26 15:47:30 -0800 |
---|---|---|
committer | sebdet <sebastien.determe@intl.att.com> | 2020-02-27 06:17:02 -0800 |
commit | d2a4df0b62b6a32c42bac45b4bee344016faa8fb (patch) | |
tree | a4d49be5501c1016de3af41f7e8935cd5187ec85 /src/main/resources/clds/camel | |
parent | c11160ecfdce03091917e2728f80848f4d8feb95 (diff) |
Add Create loop dialog
Add create loop dialog and backend part associated (this is based on this PR https://gerrit.onap.org/r/c/clamp/+/102156)
Issue-ID: CLAMP-587
Change-Id: I58524bc2d5bfbf5ca5a3acf5c59823df06fd4cd9
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'src/main/resources/clds/camel')
-rw-r--r-- | src/main/resources/clds/camel/rest/clamp-api-v2.xml | 59 |
1 files changed, 58 insertions, 1 deletions
diff --git a/src/main/resources/clds/camel/rest/clamp-api-v2.xml b/src/main/resources/clds/camel/rest/clamp-api-v2.xml index 1f927267c..280b808c3 100644 --- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -612,7 +612,40 @@ </doTry> </route> </put> - + <post + uri="/v2/loop/create/{loopName}?templateName={templateName}" + outType="org.onap.clamp.loop.Loop" consumes="application/json" + produces="application/json"> + <route> + <removeHeaders + pattern="*" + excludePattern="loopName|templateName" /> + <doTry> + <to + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Create Loop')" /> + <to + uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> + <to + uri="bean:org.onap.clamp.loop.LoopController?method=createLoop(${header.loopName}, ${header.templateName})" /> + <to + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>true</constant> + </handled> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <transform> + <simple>ERROR: ${exception.message}</simple> + </transform> + <to + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + </doCatch> + </doTry> + </route> + </post> <get uri="/v2/dictionary" outType="org.onap.clamp.tosca.Dictionary" produces="application/json"> <route> @@ -1050,6 +1083,30 @@ </doTry> </route> </get> + <get uri="/v2/templates/{templateName}/svgRepresentation" + outType="java.lang.String" produces="application/xml"> + <route> + <removeHeaders pattern="*" excludePattern="templateName" /> + <doTry> + <to + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get SVG Representation for Loop template')" /> + <to + uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')" /> + <to + uri="bean:org.onap.clamp.loop.template.LoopTemplatesService?method=getSvgRepresentation(${header.templateName})" /> + <to + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> + <doCatch> + <exception>java.lang.Exception</exception> + <handled> + <constant>false</constant> + </handled> + <to + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + </doCatch> + </doTry> + </route> + </get> <get uri="/v2/clampInformation" outType="org.onap.clamp.clds.model.ClampInformation" produces="application/json"> <to |