diff options
Diffstat (limited to 'src/main/resources')
-rw-r--r-- | src/main/resources/clds/camel/rest/clamp-api-v2.xml | 79 | ||||
-rw-r--r-- | src/main/resources/clds/camel/routes/flexible-flow.xml | 21 |
2 files changed, 47 insertions, 53 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 0d6d3cb2f..cf758720a 100644 --- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -202,25 +202,21 @@ 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="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" /> <log loggingLevel="INFO" - 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> - <to - uri="direct:deploy-closedloop" /> + <to uri="direct:deploy-loop" /> </when> <otherwise> <log @@ -230,6 +226,11 @@ 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> @@ -241,9 +242,9 @@ 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> @@ -261,25 +262,27 @@ 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> ${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="Closed 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]})" /> </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> @@ -291,9 +294,9 @@ 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> @@ -311,19 +314,17 @@ loggingLevel="INFO" message="Receive 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 the closed loop')" /> <to uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> <to uri="direct:load-loop" /> <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> <exception>java.lang.Exception</exception> @@ -342,7 +343,7 @@ </route> </put> <put - uri="/v2/loop/start/{loopName}" + uri="/v2/loop/restart/{loopName}" outType="org.onap.clamp.loop.Loop" produces="application/json"> <route> @@ -352,9 +353,9 @@ <doTry> <log loggingLevel="INFO" - message="Receive START request for loop: ${header.loopName}" /> + message="Receive 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 the closed loop')" /> <to uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> <to uri="direct:load-loop" /> @@ -363,11 +364,9 @@ <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> @@ -379,9 +378,9 @@ 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, Error reported: ${exception}','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> @@ -475,8 +474,6 @@ <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> <exception>java.lang.Exception</exception> @@ -504,7 +501,7 @@ loggingLevel="INFO" message="Receive 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 the closed loop')" /> <to uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> <to uri="direct:load-loop" /> @@ -581,7 +578,9 @@ outType="org.onap.clamp.loop.Loop" produces="application/json"> <route> - <removeHeaders pattern="*" excludePattern="loopName"/> + <removeHeaders + pattern="*" + excludePattern="loopName" /> <doTry> <log loggingLevel="INFO" @@ -618,7 +617,7 @@ 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 diff --git a/src/main/resources/clds/camel/routes/flexible-flow.xml b/src/main/resources/clds/camel/routes/flexible-flow.xml index 5f8577720..790a1679b 100644 --- a/src/main/resources/clds/camel/routes/flexible-flow.xml +++ b/src/main/resources/clds/camel/routes/flexible-flow.xml @@ -413,9 +413,9 @@ </setHeader> <log loggingLevel="INFO" - message="Endpoint to add policies to PDP Group: {{clamp.config.policy.pap.url}}/policy/pap/v1/pdps"></log> + message="Endpoint to add policies to PDP Group: {{clamp.config.policy.pap.url}}/policy/pap/v1/pdps/policies"></log> <toD - uri="{{clamp.config.policy.pap.url}}/policy/pap/v1/pdps?bridgeEndpoint=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&httpClient.connectTimeout=10000&useSystemProperties=true&authUsername={{clamp.config.policy.pap.userName}}&authPassword={{clamp.config.policy.pap.password}}" /> + uri="{{clamp.config.policy.pap.url}}/policy/pap/v1/pdps/policies?bridgeEndpoint=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&httpClient.connectTimeout=10000&useSystemProperties=true&authUsername={{clamp.config.policy.pap.userName}}&authPassword={{clamp.config.policy.pap.password}}" /> <doFinally> <to uri="direct:reset-raise-http-exception-flag" /> @@ -489,19 +489,14 @@ </doFinally> </doTry> </route> - <route id="deploy-closedloop"> - <from uri="direct:deploy-closedloop" /> + <route id="deploy-loop"> + <from uri="direct:deploy-loop" /> <doTry> <log loggingLevel="INFO" 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]})" /> @@ -540,19 +535,19 @@ <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" /> <setProperty propertyName="logMessage"> - <simple>Deploy closed loop status</simple> + <simple>Deploy closed loop status (id:${exchangeProperty[deploymentId]})</simple> </setProperty> <to uri="direct:dump-loop-log-http-response" /> </doFinally> </doTry> </route> - <route id="undeploy-closedloop"> - <from uri="direct:undeploy-closedloop" /> + <route id="undeploy-loop"> + <from uri="direct:undeploy-loop" /> <doTry> <log loggingLevel="INFO" - message="UNdeploy the closed loop: ${exchangeProperty[loopObject].getName()} : ${exchangeProperty[loopObject].getDcaeDeploymentId()}" /> + message="Undeploy the closed loop: ${exchangeProperty[loopObject].getName()} : ${exchangeProperty[loopObject].getDcaeDeploymentId()}" /> <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('DCAE', 'Undeploy closed loop')" /> |