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 | |
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')
-rw-r--r-- | src/main/resources/META-INF/resources/swagger.html | 2 | ||||
-rw-r--r-- | src/main/resources/clds/camel/rest/clamp-api-v2.xml | 59 |
2 files changed, 59 insertions, 2 deletions
diff --git a/src/main/resources/META-INF/resources/swagger.html b/src/main/resources/META-INF/resources/swagger.html index 0138d9a30..74322f36b 100644 --- a/src/main/resources/META-INF/resources/swagger.html +++ b/src/main/resources/META-INF/resources/swagger.html @@ -3758,7 +3758,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> <div id="footer"> <div id="footer-text"> -Last updated 2019-05-27 14:30:20 CEST +Last updated 2020-02-12 02:20:53 PST </div> </div> </body> 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 |