summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
b0f7e5b)
Fix flows, remove getLoop at the end and add better error catching in
camel flows
Issue-ID: CLAMP-369
Change-Id: I473d63d9189daf69e1e4e6d025f06ac586a9f2ab
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
excludePattern="loopName" />
<doTry>
<to
excludePattern="loopName" />
<doTry>
<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(*, 'DEPLOY the closed loop')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
- <to
- uri="direct:load-loop" />
- <to
- uri="direct:get-status-from-policy" />
- <to
- uri="direct:get-status-from-dcae" />
+ <to uri="direct:load-loop" />
+ <to uri="direct:get-status-from-policy" />
+ <to uri="direct:get-status-from-dcae" />
- message="policy status0000: ${exchangeProperty[policyStatus]}"></log>
+ message="Policy deployment status: ${exchangeProperty[policyStatus]}"></log>
<choice>
<when>
<simple> ${exchangeProperty[policyStatus]} == 'SUBMITTED' and
${exchangeProperty[dcaeStatus]} == 'NOT_DEPLOYED'
</simple>
<choice>
<when>
<simple> ${exchangeProperty[policyStatus]} == 'SUBMITTED' and
${exchangeProperty[dcaeStatus]} == 'NOT_DEPLOYED'
</simple>
- <to
- uri="direct:deploy-closedloop" />
+ <to uri="direct:deploy-closedloop" />
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]})" />
</otherwise>
</choice>
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]})" />
</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>
<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"
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}" />
- 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>
</doCatch>
</doTry>
</route>
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Undeploy the closed loop')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Undeploy the closed loop')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
- <to
- uri="direct:load-loop" />
- <to
- uri="direct:get-status-from-dcae" />
+ <to uri="direct:load-loop" />
+ <to uri="direct:get-status-from-dcae" />
<choice>
<when>
<simple> ${exchangeProperty[dcaeStatus]} == 'DEPLOYED'
</simple>
<choice>
<when>
<simple> ${exchangeProperty[dcaeStatus]} == 'DEPLOYED'
</simple>
- <to
- uri="direct:undeploy-closedloop" />
+ <to uri="direct:undeploy-closedloop" />
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]})" />
</otherwise>
</choice>
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]})" />
</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>
<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"
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}" />
- 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>
</doCatch>
</doTry>
</route>
<to uri="direct:remove-all-policy-from-active-pdp-group" />
<log
loggingLevel="INFO"
<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.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>
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
<doCatch>
message="START 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]})" />
message="START 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})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
<doCatch>
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
<doCatch>
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]})" />
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>
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
<doCatch>
outType="org.onap.clamp.loop.Loop"
produces="application/json">
<route>
outType="org.onap.clamp.loop.Loop"
produces="application/json">
<route>
- <removeHeaders pattern="*" excludePattern="loopName"/>
+ <removeHeaders
+ pattern="*"
+ excludePattern="loopName" />
<doTry>
<log
loggingLevel="INFO"
<doTry>
<log
loggingLevel="INFO"
loggingLevel="ERROR"
message="Get Status request failed for loop: ${header.loopName}" />
<to
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>
</doTry>
</route>
</doCatch>
</doTry>
</route>
message="Deploy the closed loop: ${exchangeProperty[loopObject].getName()}" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('DCAE', 'Deploy closed loop')" />
message="Deploy the closed loop: ${exchangeProperty[loopObject].getName()}" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('DCAE', 'Deploy closed loop')" />
- <simple>${exchangeProperty[loopObject].getOperationalPolicies()}
- </simple>
- <setProperty propertyName="operationalPolicy">
- <simple>${body}</simple>
- </setProperty>
<setBody>
<method ref="org.onap.clamp.loop.LoopOperation"
method="getDeployPayload(${exchangeProperty[loopObject]})" />
<setBody>
<method ref="org.onap.clamp.loop.LoopOperation"
method="getDeployPayload(${exchangeProperty[loopObject]})" />