<removeHeaders pattern="*" />
<doTry>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get All ClosedLoop')" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Loop')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
<to
excludePattern="loopName" />
<doTry>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get Closed Loop')" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Loop')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
<to
pattern="*"
excludePattern="loopName" />
<doTry>
+ <log
+ loggingLevel="INFO"
+ message="DCAE DEPLOY request for loop: ${header.loopName}" />
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Deploy the closed loop')" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'DCAE DEPLOY request')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
+ <to uri="direct:load-loop" />
<to
- uri="direct:load-loop" />
- <split>
- <simple>${exchangeProperty[loopObject].getOperationalPolicies()}
- </simple>
- <setProperty propertyName="operationalPolicy">
- <simple>${body}</simple>
- </setProperty>
- <to
- uri="direct:get-status-from-policy" />
- </split>
- <to
- uri="direct:get-status-from-dcae" />
- <choice>
- <log
- loggingLevel="INFO"
- message="policy status0: ${exchangeProperty[policyStatus]}"></log>
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DCAE DEPLOY request','INFO',${exchangeProperty[loopObject]})" />
+
+ <to uri="direct:get-status-from-policy" />
+ <to uri="direct:get-status-from-dcae" />
<log
loggingLevel="INFO"
- message="dcae status0: ${exchangeProperty[dcaeStatus]}"></log>
+ message="Policy deployment status: ${exchangeProperty[policyStatus]}"></log>
+ <choice>
<when>
<simple> ${exchangeProperty[policyStatus]} == 'SUBMITTED' and
${exchangeProperty[dcaeStatus]} == 'NOT_DEPLOYED'
</simple>
- <to
- uri="direct:deploy-closedloop" />
+ <to uri="direct:deploy-loop" />
</when>
<otherwise>
<log
loggingLevel="INFO"
- message="Closed Loop is in state ${exchangeProperty[policyStatus]}, it can only be deployed when in state SUBMIT" />
+ message="Loop is in state ${exchangeProperty[policyStatus]}, it can only be deployed when in state SUBMIT" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Closed Loop is in state ${exchangeProperty[policyStatus]}, it can only be deployed when in state SUBMIT','ERROR',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Loop is in state ${exchangeProperty[policyStatus]}, it can only be deployed when in state SUBMIT','ERROR',${exchangeProperty[loopObject]})" />
</otherwise>
</choice>
+ <log
+ loggingLevel="INFO"
+ message="DEPLOY request successfully executed for loop: ${header.loopName}" />
+ <to
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request successfully executed','INFO',${exchangeProperty[loopObject]})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
<doCatch>
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
<log
loggingLevel="ERROR"
- message="Deploy request failed for loop: ${header.loopName}" />
+ message="DEPLOY request failed for loop: ${header.loopName}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Deploy request failed','ERROR',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request failed, Error reported: ${exception}','ERROR',${exchangeProperty[loopObject]})" />
</doCatch>
</doTry>
</route>
pattern="*"
excludePattern="loopName" />
<doTry>
+ <log
+ loggingLevel="INFO"
+ message="DCAE UNDEPLOY request for loop: ${header.loopName}" />
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Undeploy the closed loop')" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'DCAE UNDEPLOY request')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
+ <to uri="direct:load-loop" />
<to
- uri="direct:load-loop" />
- <to
- uri="direct:get-status-from-dcae" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DCAE UNDEPLOY request','INFO',${exchangeProperty[loopObject]})" />
+ <to uri="direct:get-status-from-dcae" />
<choice>
<when>
- <simple> ${exchangeProperty[dcaeStatus]} == 'DEPLOYED'
+ <simple> ${exchangeProperty[dcaeStatus]} == 'DEPLOYED' or ${exchangeProperty[dcaeStatus]} == 'IN_ERROR' or ${exchangeProperty[dcaeStatus]} == 'PROCESSING'
</simple>
- <to
- uri="direct:undeploy-closedloop" />
+ <to uri="direct:undeploy-loop" />
</when>
<otherwise>
<log
loggingLevel="INFO"
- message="Closed Loop is in state ${exchangeProperty[dcaeStatus]}, it can only be undeployed when in state DEPLOYED" />
+ message="Loop is in state ${exchangeProperty[dcaeStatus]}, it can only be undeployed when in state DEPLOYED/IN_ERROR/PROCESSING" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Closed Loop is in state ${exchangeProperty[dcaeStatus]}, it can only be deployed when in state DEPLOYED','ERROR',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Loop is in state ${exchangeProperty[dcaeStatus]}, it can only be deployed when in state DEPLOYED','ERROR',${exchangeProperty[loopObject]})" />
</otherwise>
</choice>
+ <log
+ loggingLevel="INFO"
+ message="UNDEPLOY request successfully executed for loop: ${header.loopName}" />
+ <to
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request successfully executed','INFO',${exchangeProperty[loopObject]})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
<doCatch>
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
<log
loggingLevel="ERROR"
- message="Undeploy request failed for loop: $${header.loopName}" />
+ message="UNDEPLOY request failed for loop: ${header.loopName}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Undeploy request failed','ERROR',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request failed, Error reported: ${exception}','ERROR',${exchangeProperty[loopObject]})" />
</doCatch>
</doTry>
</route>
<doTry>
<log
loggingLevel="INFO"
- message="Receive STOP request for loop: ${header.loopName}" />
+ message="STOP request for loop: ${header.loopName}" />
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Stop the closed loop')" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*,'STOP request')" />
<to
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('STOP request','INFO',${exchangeProperty[loopObject]})" />
+
<to uri="direct:remove-all-policy-from-active-pdp-group" />
<log
loggingLevel="INFO"
- message="STOP request successfully executed for loop: ${body}" />
+ message="STOP request successfully executed for loop: ${header.loopName}" />
<to
uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request successfully executed','INFO',${exchangeProperty[loopObject]})" />
- <to
- uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
<doCatch>
loggingLevel="ERROR"
message="STOP request failed for loop: $${header.loopName}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request failed','ERROR',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request failed, Error reported: ${exception}','ERROR',${exchangeProperty[loopObject]})" />
</doCatch>
</doTry>
</route>
</put>
<put
- uri="/v2/loop/start/{loopName}"
+ uri="/v2/loop/restart/{loopName}"
outType="org.onap.clamp.loop.Loop"
produces="application/json">
<route>
<doTry>
<log
loggingLevel="INFO"
- message="Receive START request for loop: ${header.loopName}" />
+ message="RESTART request for loop: ${header.loopName}" />
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Start the closed loop')" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*,'RESTART request')" />
<to
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('RESTART request','INFO',${exchangeProperty[loopObject]})" />
<to uri="direct:add-all-to-active-pdp-group" />
<log
loggingLevel="INFO"
- message="START request successfully executed for loop: ${header.loopName}" />
+ message="RESTART request successfully executed for loop: ${header.loopName}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('START request successfully executed','INFO',${exchangeProperty[loopObject]})" />
- <to
- uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('RESTART request successfully executed','INFO',${exchangeProperty[loopObject]})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
<doCatch>
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
<log
loggingLevel="ERROR"
- message="START request failed for loop: ${header.loopName}" />
+ message="RESTART request failed for loop: ${header.loopName}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('START request failed','INFO',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('RESTART request failed, Error reported: ${exception}','INFO',${exchangeProperty[loopObject]})" />
</doCatch>
</doTry>
</route>
<doTry>
<log
loggingLevel="INFO"
- message="Receive SUBMIT request for loop: ${header.loopName}" />
+ message="POLICY SUBMIT request for loop: ${header.loopName}" />
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Submit the closed loop')" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'POLICY SUBMIT request')" />
<to
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('Receive SUBMIT request','INFO',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('POLICY SUBMIT request','INFO',${exchangeProperty[loopObject]})" />
<setProperty propertyName="raiseHttpExceptionFlag">
<simple resultType="java.lang.Boolean">false</simple>
</setProperty>
message="SUBMIT request successfully executed for loop: ${header.loopName}" />
<to
uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request successfully executed','INFO',${exchangeProperty[loopObject]})" />
- <to
- uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
<doCatch>
loggingLevel="ERROR"
message="SUBMIT request failed for loop: ${header.loopName}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request failed','ERROR',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request failed, Error reported: ${exception}','ERROR',${exchangeProperty[loopObject]})" />
</doCatch>
</doTry>
</route>
<doTry>
<log
loggingLevel="INFO"
- message="Receive DELETE request for loop: ${header.loopName}" />
+ message="DELETE request for loop: ${header.loopName}" />
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Delete the closed loop')" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*,'DELETE request')" />
<to
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('Receive DELETE request','INFO',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request','INFO',${exchangeProperty[loopObject]})" />
<to uri="direct:remove-all-policy-from-active-pdp-group" />
<split>
<simple>${exchangeProperty[loopObject].getMicroServicePolicies()}
loggingLevel="ERROR"
message="DELETE request failed for loop: ${header.loopName}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request failed','ERROR',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request failed, Error reported: ${exception}','ERROR',${exchangeProperty[loopObject]})" />
</doCatch>
</doTry>
</route>
outType="org.onap.clamp.loop.Loop"
produces="application/json">
<route>
- <removeHeaders pattern="*" excludePattern="loopName"/>
+ <removeHeaders
+ pattern="*"
+ excludePattern="loopName" />
<doTry>
<log
loggingLevel="INFO"
- message="Get current status for loop: ${header.loopName}" />
+ message="GET STATUS request for loop: ${header.loopName}" />
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get the closed loop status')" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET STATUS request')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
<to uri="direct:load-loop" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive GET STATUS request','INFO',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request','INFO',${exchangeProperty[loopObject]})" />
<setProperty propertyName="raiseHttpExceptionFlag">
<simple resultType="java.lang.Boolean">false</simple>
</setProperty>
<to uri="direct:get-status-from-policy" />
<to uri="direct:get-status-from-dcae" />
<to
- uri="bean:org.onap.clamp.loop.LoopOperation?method=updateLoopStatus(${exchangeProperty[policyStatus], ${exchangeProperty[dcaeStatus])" />
-
+ uri="bean:org.onap.clamp.loop.LoopOperation?method=updateLoopStatus(${exchangeProperty[loopObject]},${exchangeProperty[policyStatus]}, ${exchangeProperty[dcaeStatus]})" />
<log
loggingLevel="INFO"
- message="Get Status request successfully executed for loop: ${body}" />
+ message="Get Status request successfully executed. The new state is: ${body}" />
<to
uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Get Status request successfully executed','INFO',${exchangeProperty[loopObject]})" />
- <to
- uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
<doCatch>
loggingLevel="ERROR"
message="Get Status request failed for loop: ${header.loopName}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Get Status request failed','ERROR',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Get Status request failed, Error reported: ${exception}','ERROR',${exchangeProperty[loopObject]})" />
</doCatch>
+ <doFinally>
+ <to
+ uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
+ </doFinally>
</doTry>
</route>
</get>