From: sebdet Date: Wed, 8 May 2019 13:36:55 +0000 (+0200) Subject: Fix flows and error catching X-Git-Tag: 4.0.1~9 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=b328b37f8e6b27cc4eed183bb0096d6603517e20;hp=b0f7e5bf406a393abc6cfb9fc6cf1003b6e6ef10;p=clamp.git Fix flows and error catching 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 --- 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 4d3c6b38..1883145d 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" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'DEPLOY the closed loop')" /> - - - + + + + message="Policy deployment status: ${exchangeProperty[policyStatus]}"> ${exchangeProperty[policyStatus]} == 'SUBMITTED' and ${exchangeProperty[dcaeStatus]} == 'NOT_DEPLOYED' - + + + @@ -241,9 +242,9 @@ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + message="DEPLOY request failed for loop: ${header.loopName}" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request failed, Error reported: ${exception}','ERROR',${exchangeProperty[loopObject]})" /> @@ -261,16 +262,13 @@ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Undeploy the closed loop')" /> - - + + ${exchangeProperty[dcaeStatus]} == 'DEPLOYED' - + + + @@ -291,9 +294,9 @@ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + message="UNDEPLOY request failed for loop: ${header.loopName}" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request failed, Error reported: ${exception}','ERROR',${exchangeProperty[loopObject]})" /> @@ -318,11 +321,9 @@ + message="STOP request successfully executed for loop: ${header.loopName}" /> - @@ -366,8 +367,6 @@ message="START request successfully executed for loop: ${header.loopName}" /> - @@ -474,8 +473,6 @@ message="SUBMIT request successfully executed for loop: ${header.loopName}" /> - @@ -581,7 +578,9 @@ outType="org.onap.clamp.loop.Loop" produces="application/json"> - + + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Get Status request failed, Error reported: ${exception}','ERROR',${exchangeProperty[loopObject]})" /> diff --git a/src/main/resources/clds/camel/routes/flexible-flow.xml b/src/main/resources/clds/camel/routes/flexible-flow.xml index 5f857772..43b231e4 100644 --- a/src/main/resources/clds/camel/routes/flexible-flow.xml +++ b/src/main/resources/clds/camel/routes/flexible-flow.xml @@ -497,11 +497,6 @@ message="Deploy the closed loop: ${exchangeProperty[loopObject].getName()}" /> - ${exchangeProperty[loopObject].getOperationalPolicies()} - - - ${body} -