From cd64cc4b390a15602e084d0d94007ec83aa530a4 Mon Sep 17 00:00:00 2001 From: sebdet Date: Wed, 10 Apr 2019 14:07:35 +0200 Subject: Add delete support Move delete code to Camel way so that it's more flexible + introduce removal of the loop + test Issue-ID: CLAMP-315 Change-Id: I7df87e1441d4511ad6b42d0d269c3b2c8c7d8eef Signed-off-by: sebdet --- .../resources/clds/camel/rest/clamp-api-v2.xml | 89 ++++++++++++++++++---- .../resources/clds/camel/routes/flexible-flow.xml | 14 ++-- 2 files changed, 81 insertions(+), 22 deletions(-) (limited to 'src/main/resources') 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 8a39f1358..ffa4719f0 100644 --- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -97,14 +97,14 @@ - - ${header.loopName} - + message="Receive SUBMIT request for loop: ${header.loopName}" /> + + ${header.loopName} + @@ -120,12 +120,12 @@ - + false - + true @@ -143,12 +143,12 @@ - + false - + true @@ -165,18 +165,18 @@ loggingLevel="INFO" message="Processing Guard Policy: ${header.guardPolicy.getKey()}" /> - + false - + true - + true @@ -190,14 +190,73 @@ + + + ${header.loopName} + + - + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive DELETE request','INFO',${header.LoopObject})" /> + + ${header.LoopObject.getMicroServicePolicies()} + + + ${body} + + + + true + + + + + + + ${header.LoopObject.getOperationalPolicies()} + + + ${body} + + + + true + + + + + ${header.operationalPolicy.createGuardPolicyPayloads().entrySet()} + + + ${body} + + + + + true + + + + + + + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request successfully executed','INFO',${header.LoopObject})" /> diff --git a/src/main/resources/clds/camel/routes/flexible-flow.xml b/src/main/resources/clds/camel/routes/flexible-flow.xml index 64af7b264..1ce67ccee 100644 --- a/src/main/resources/clds/camel/routes/flexible-flow.xml +++ b/src/main/resources/clds/camel/routes/flexible-flow.xml @@ -120,7 +120,7 @@ loggingLevel="INFO" message="Endpoint to create microservice policy: ${header.CamelHttpMethod} ${header.CamelHttpUri}"> + uri="http4://policyhost:8085?throwExceptionOnFailure=${header.RaiseHttpExceptionFlag}" /> @@ -143,7 +143,7 @@ loggingLevel="INFO" message="Endpoint to delete microservice policy: ${header.CamelHttpMethod} ${header.CamelHttpUri}"> + uri="http4://policyhost:8085?throwExceptionOnFailure=${header.RaiseHttpExceptionFlag}&deleteWithBody=false&mapHttpMessageBody=false&mapHttpMessageFormUrlEncodedBody=false" /> @@ -171,7 +171,7 @@ loggingLevel="INFO" message="Endpoint to create operational policy: ${header.CamelHttpMethod} ${header.CamelHttpUri}"> + uri="http4://policyhost:8085?throwExceptionOnFailure=${header.RaiseHttpExceptionFlag}" /> @@ -194,7 +194,7 @@ loggingLevel="INFO" message="Endpoint to delete operational policy: ${header.CamelHttpMethod} ${header.CamelHttpUri}"> + uri="http4://policyhost:8085?throwExceptionOnFailure=${header.RaiseHttpExceptionFlag}&deleteWithBody=false&mapHttpMessageBody=false&mapHttpMessageFormUrlEncodedBody=false" /> @@ -222,7 +222,7 @@ loggingLevel="INFO" message="Endpoint to create guard policy: ${header.CamelHttpMethod} ${header.CamelHttpUri}"> + uri="http4://policyhost:8085?throwExceptionOnFailure=${header.RaiseHttpExceptionFlag}" /> @@ -245,7 +245,7 @@ loggingLevel="INFO" message="Endpoint to delete guard policy: ${header.CamelHttpMethod} ${header.CamelHttpUri}"> + uri="http4://policyhost:8085?throwExceptionOnFailure=${header.RaiseHttpExceptionFlag}&deleteWithBody=false&mapHttpMessageBody=false&mapHttpMessageFormUrlEncodedBody=false" /> @@ -273,7 +273,7 @@ loggingLevel="INFO" message="Endpoint to create PDP Group policy: ${header.CamelHttpMethod} ${header.CamelHttpUri}"> + uri="http4://policyhost:8085?throwExceptionOnFailure=${header.RaiseHttpExceptionFlag}" /> -- cgit 1.2.3-korg