aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/resources/clds/camel/rest
diff options
context:
space:
mode:
authorEddy Hautot <eh552t@intl.att.com>2019-04-10 15:57:33 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-10 15:57:33 +0000
commite4e7c6a19dd50516247ad33dbe2a868b7825ea10 (patch)
treecb2d387e03c42bc75afb270a1cf4a7a09d76ae17 /src/main/resources/clds/camel/rest
parenta98577e6a0a6fed54afebeb08c4de7c9215e49bb (diff)
parentece804b26d14786cc382dedc5a955f0f36b54029 (diff)
Merge changes I8c744a32,Id357ac37,I7df87e14,I2abd173c,Ie53b1dfd
* changes: Add timeout + Creds Remove SQL Dump Add delete support Rework Gson in Camel PDP Group support
Diffstat (limited to 'src/main/resources/clds/camel/rest')
-rw-r--r--src/main/resources/clds/camel/rest/clamp-api-v2.xml98
1 files changed, 83 insertions, 15 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 810c9d205..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 @@
</put>
<put uri="/v2/loop/submit/{loopName}">
<route>
- <setBody>
- <simple>${header.loopName}</simple>
- </setBody>
<log
loggingLevel="INFO"
- message="Receive SUBMIT request for loop: ${body}" />
+ message="Receive SUBMIT request for loop: ${header.loopName}" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
+ <setBody>
+ <simple>${header.loopName}</simple>
+ </setBody>
<to uri="direct:load-loop" />
<to
uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive SUBMIT request','INFO',${header.LoopObject})" />
@@ -120,12 +120,12 @@
<log
loggingLevel="INFO"
message="Processing Micro Service Policy: ${header.microServicePolicy.getName()}" />
- <setHeader headerName="HttpQueryExceptionFlag">
+ <setHeader headerName="RaiseHttpExceptionFlag">
<simple resultType="java.lang.Boolean">false</simple>
</setHeader>
<to uri="direct:delete-micro-service-policy" />
- <setHeader headerName="HttpQueryExceptionFlag">
+ <setHeader headerName="RaiseHttpExceptionFlag">
<simple resultType="java.lang.Boolean">true</simple>
</setHeader>
<to uri="direct:create-micro-service-policy" />
@@ -143,12 +143,12 @@
<log
loggingLevel="INFO"
message="Processing Operational Policy: ${header.operationalPolicy.getName()}" />
- <setHeader headerName="HttpQueryExceptionFlag">
+ <setHeader headerName="RaiseHttpExceptionFlag">
<simple resultType="java.lang.Boolean">false</simple>
</setHeader>
<to uri="direct:delete-operational-policy" />
- <setHeader headerName="HttpQueryExceptionFlag">
+ <setHeader headerName="RaiseHttpExceptionFlag">
<simple resultType="java.lang.Boolean">true</simple>
</setHeader>
<to uri="direct:create-operational-policy" />
@@ -165,30 +165,98 @@
loggingLevel="INFO"
message="Processing Guard Policy: ${header.guardPolicy.getKey()}" />
- <setHeader headerName="HttpQueryExceptionFlag">
+ <setHeader headerName="RaiseHttpExceptionFlag">
<simple resultType="java.lang.Boolean">false</simple>
</setHeader>
<to uri="direct:delete-guard-policy" />
- <setHeader headerName="HttpQueryExceptionFlag">
+ <setHeader headerName="RaiseHttpExceptionFlag">
<simple resultType="java.lang.Boolean">true</simple>
</setHeader>
<to uri="direct:create-guard-policy" />
</split>
-
</split>
+ <setHeader headerName="RaiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">true</simple>
+ </setHeader>
+ <to uri="direct:create-pdp-group-policy" />
+
+ <log
+ loggingLevel="INFO"
+ message="SUBMIT request successfully executed for loop: ${body}" />
+ <to
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request successfully executed','INFO',${header.LoopObject})" />
</route>
</put>
<put uri="/v2/loop/delete/{loopName}">
<route>
+ <log
+ loggingLevel="INFO"
+ message="Receive DELETE request for loop: ${header.loopName}" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
+ <setBody>
+ <simple>${header.loopName}</simple>
+ </setBody>
+ <to uri="direct:load-loop" />
<to
- uri="bean:org.onap.clamp.operation.LoopOperation?method=deleteMsPolicies(${header.loopName})" />
- <to
- uri="bean:org.onap.clamp.operation.LoopOperation?method=deleteOpPolicy(${header.loopName})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive DELETE request','INFO',${header.LoopObject})" />
+ <split>
+ <simple>${header.LoopObject.getMicroServicePolicies()}
+ </simple>
+ <setHeader headerName="microServicePolicy">
+ <simple>${body}</simple>
+ </setHeader>
+ <log
+ loggingLevel="INFO"
+ message="Processing Micro Service Policy: ${header.microServicePolicy.getName()}" />
+ <setHeader headerName="RaiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">true</simple>
+ </setHeader>
+ <to uri="direct:delete-micro-service-policy" />
+ </split>
+
+ <log
+ loggingLevel="INFO"
+ message="Processing all OPERATIONAL policies defined in loop ${header.LoopObject.getName()}" />
+ <split>
+ <simple>${header.LoopObject.getOperationalPolicies()}
+ </simple>
+ <setHeader headerName="operationalPolicy">
+ <simple>${body}</simple>
+ </setHeader>
+ <log
+ loggingLevel="INFO"
+ message="Processing Operational Policy: ${header.operationalPolicy.getName()}" />
+ <setHeader headerName="RaiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">true</simple>
+ </setHeader>
+ <to uri="direct:delete-operational-policy" />
+ <log
+ loggingLevel="INFO"
+ message="Processing all GUARD policies defined in loop ${header.LoopObject.getName()}" />
+ <split>
+ <simple>${header.operationalPolicy.createGuardPolicyPayloads().entrySet()}
+ </simple>
+ <setHeader headerName="guardPolicy">
+ <simple>${body}</simple>
+ </setHeader>
+ <log
+ loggingLevel="INFO"
+ message="Processing Guard Policy: ${header.guardPolicy.getKey()}" />
+
+ <setHeader headerName="RaiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">true</simple>
+ </setHeader>
+ <to uri="direct:delete-guard-policy" />
+ </split>
+ </split>
+ <to uri="bean:org.onap.clamp.loop.log.LoopService?method=deleteLoop(${header.loopName})" />
+ <log
+ loggingLevel="INFO"
+ message="DELETE request successfully executed for loop: ${body}" />
<to
- uri="bean:org.onap.clamp.operation.LoopOperation?method=deleteGuardPolicy(${header.loopName})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request successfully executed','INFO',${header.LoopObject})" />
</route>
</put>
</rest>