diff options
author | brunomilitzer <bruno.militzer@est.tech> | 2022-05-05 15:20:30 +0100 |
---|---|---|
committer | brunomilitzer <bruno.militzer@est.tech> | 2022-05-25 15:01:02 +0100 |
commit | f35587328e1bd99882ed8a4df85d01660d54c007 (patch) | |
tree | 668b2e35b88a24dbf60ce84d62c21c463e2c0449 /runtime/src/main/resources/clds/camel/rest | |
parent | b77b61847ddd169da9a71b05742ed51bc826f5f6 (diff) |
Added Edit Instance Properties Functionality
Issue-ID: POLICY-4094
Change-Id: Id52dba3c0912486fa551697be170c05542a0ee22
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 | 50 |
1 files changed, 47 insertions, 3 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 8ad20a844..7db468024 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 @@ -1480,7 +1480,7 @@ produces="application/json"> <route> <removeHeaders pattern="*" - excludePattern="name|version"/> + excludePattern="name|version|instanceName"/> <doTry> <to uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Tosca Service Template ')"/> @@ -1860,6 +1860,50 @@ </doTry> </route> </post> + + <put uri="/v2/acm/putToscaInstanceProperties" + type="java.lang.String" + consumes="plain/text" + outType="java.lang.String" + produces="application/json" + bindingMode="off"> + <route> + <removeHeaders pattern="*" excludePattern="name|version"/> + <setProperty name="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">false</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:put-tosca-instance-properties"/> + <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="Updating Instance Properties FAILED"/> + + <setHeader name="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>Updating Instance Properties FAILED</simple> + </setBody> + </doCatch> + </doTry> + </route> + </put> + <delete uri="/v2/acm/deleteToscaInstanceProperties" type="java.lang.String" consumes="plain/text" @@ -1907,7 +1951,7 @@ <get uri="/v2/acm/getCommonOrInstanceProperties" outType="java.lang.String" bindingMode="off" produces="application/json"> <route> <removeHeaders pattern="*" - excludePattern="name|version|requestId|common"/> + excludePattern="name|version|instanceName|requestId|common"/> <doTry> <to uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Common Properties ')"/> <to uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')"/> @@ -1932,7 +1976,7 @@ <constant>500</constant> </setHeader> <setBody> - <simple>GET Common Properties FAILED</simple> + <simple>GET Common or Instance Properties FAILED</simple> </setBody> </doCatch> </doTry> |