diff options
author | sebdet <sebastien.determe@intl.att.com> | 2020-02-27 14:43:57 -0800 |
---|---|---|
committer | sebdet <sebastien.determe@intl.att.com> | 2020-02-27 15:13:19 -0800 |
commit | 2d28cbf6954c50de004a0d8f1a2ada7ec400fea3 (patch) | |
tree | ef3bb61762221737c3716a0431d0f90f1c7a7a6c /src/main/resources/clds/camel/rest | |
parent | 95fc10c2f7db4ac8279e9eb595380b265e1614e8 (diff) |
Fix bug in operational policy
Fix bugs in camel routes and operational policy due to changes done for op policy insertion/removal
Issue-ID: CLAMP-647
Change-Id: I68524bd3d5bfbf5dd7a4bcf6d59853df07fd4dd9
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'src/main/resources/clds/camel/rest')
-rw-r--r-- | src/main/resources/clds/camel/rest/clamp-api-v2.xml | 33 |
1 files changed, 10 insertions, 23 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 3bcfc06bb..fe3f6bdaf 100644 --- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -569,29 +569,21 @@ </route> </get> - <put uri="/v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}" - outType="org.onap.clamp.loop.Loop" produces="application/json"> + <put uri="/v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}" outType="org.onap.clamp.loop.Loop" produces="application/json"> <route> - <removeHeaders pattern="*" excludePattern="loopName" /> + <removeHeaders pattern="*" excludePattern="loopName|policyType|policyVersion" /> <doTry> - <log loggingLevel="INFO" - message="ADD OperationalPolicy request for loop: ${header.loopName}" /> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'ADD OperationalPolicy request')" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add operational Policy')" /> <to - uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','write')" /> + uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> <to uri="direct:load-loop" /> <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request','INFO',${exchangeProperty[loopObject]})" /> - <doTry> - <to - uri="bean:org.onap.clamp.loop.LoopController?method=addOperationalPolicy(${loopName},${policyType},${policyVersion})" /> - - <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request successfully executed','INFO',${exchangeProperty[loopObject]})" /> - <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> - </doTry> + uri="bean:org.onap.clamp.loop.LoopController?method=addOperationalPolicy(${header.loopName},${header.policyType},${header.policyVersion})" /> + <to + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request successfully executed','INFO',${exchangeProperty[loopObject]})" /> + <to + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> <doCatch> <exception>java.lang.Exception</exception> <handled> @@ -602,13 +594,8 @@ <log loggingLevel="ERROR" message="ADD OperationalPolicy request failed for loop: ${header.loopName}" /> <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request failed','ERROR',${exchangeProperty[loopObject]})" /> </doCatch> - <doFinally> - <setBody> - <simple>${exchangeProperty[loopObject]}</simple> - </setBody> - </doFinally> </doTry> </route> </put> |