aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/resources/clds/camel/rest/clamp-api-v2.xml
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources/clds/camel/rest/clamp-api-v2.xml')
-rw-r--r--src/main/resources/clds/camel/rest/clamp-api-v2.xml73
1 files changed, 39 insertions, 34 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 ffa4719f0..e6dc27cec 100644
--- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml
+++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml
@@ -43,8 +43,14 @@
<route>
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
+ <setHeader headerName="GlobalPropertiesJson">
+ <simple>${body}</simple>
+ </setHeader>
+ <to uri="direct:load-loop" />
+ <to
+ uri="bean:org.onap.clamp.loop.LoopController?method=updateGlobalPropertiesJson(${header.loopName},${header.GlobalPropertiesJson})" />
<to
- uri="bean:org.onap.clamp.loop.LoopController?method=updateGlobalPropertiesJson(${header.loopName},${body})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Global Properties UPDATED','INFO',${header.LoopObject})" />
</route>
</post>
<post
@@ -56,8 +62,14 @@
<route>
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
+ <setHeader headerName="OperationalPoliciesArray">
+ <simple>${body}</simple>
+ </setHeader>
+ <to uri="direct:load-loop" />
<to
- uri="bean:org.onap.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${body})" />
+ uri="bean:org.onap.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${header.OperationalPoliciesArray})" />
+ <to
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Operational and Guard policies UPDATED','INFO',${header.LoopObject})" />
</route>
</post>
<post
@@ -69,8 +81,15 @@
<route>
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
+ <setHeader headerName="MicroServicePolicyObject">
+ <simple>${body}</simple>
+ </setHeader>
+
+ <to uri="direct:load-loop" />
<to
- uri="bean:org.onap.clamp.loop.LoopController?method=updateMicroservicePolicy(${header.loopName},${body})" />
+ uri="bean:org.onap.clamp.loop.LoopController?method=updateMicroservicePolicy(${header.loopName},${header.MicroServicePolicyObject})" />
+ <to
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Micro Service policies UPDATED','INFO',${header.LoopObject})" />
</route>
</post>
<put
@@ -95,19 +114,23 @@
uri="bean:org.onap.clamp.operation.LoopOperation?method=unDeployLoop(${header.loopName})" />
</route>
</put>
- <put uri="/v2/loop/submit/{loopName}">
+ <put
+ uri="/v2/loop/submit/{loopName}"
+ outType="org.onap.clamp.loop.Loop"
+ produces="application/json">
<route>
<log
loggingLevel="INFO"
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})" />
+ <setHeader headerName="RaiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">false</simple>
+ </setHeader>
+ <to uri="direct:remove-all-policy-from-active-pdp-group" />
<log
loggingLevel="INFO"
message="Processing all MICRO-SERVICES policies defined in loop ${header.LoopObject.getName()}" />
@@ -125,9 +148,6 @@
</setHeader>
<to uri="direct:delete-micro-service-policy" />
- <setHeader headerName="RaiseHttpExceptionFlag">
- <simple resultType="java.lang.Boolean">true</simple>
- </setHeader>
<to uri="direct:create-micro-service-policy" />
</split>
@@ -148,9 +168,6 @@
</setHeader>
<to uri="direct:delete-operational-policy" />
- <setHeader headerName="RaiseHttpExceptionFlag">
- <simple resultType="java.lang.Boolean">true</simple>
- </setHeader>
<to uri="direct:create-operational-policy" />
<log
loggingLevel="INFO"
@@ -170,22 +187,18 @@
</setHeader>
<to uri="direct:delete-guard-policy" />
- <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" />
-
+ <to uri="direct:add-all-to-active-pdp-group" />
+
<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})" />
+ <to
+ uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
</route>
</put>
<put uri="/v2/loop/delete/{loopName}">
@@ -195,12 +208,10 @@
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.loop.log.LoopLogService?method=addLog('Receive DELETE request','INFO',${header.LoopObject})" />
+ <to uri="direct:remove-all-policy-from-active-pdp-group" />
<split>
<simple>${header.LoopObject.getMicroServicePolicies()}
</simple>
@@ -210,9 +221,7 @@
<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>
@@ -228,9 +237,7 @@
<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"
@@ -245,13 +252,11 @@
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})" />
+ <to
+ uri="bean:org.onap.clamp.loop.log.LoopService?method=deleteLoop(${header.loopName})" />
<log
loggingLevel="INFO"
message="DELETE request successfully executed for loop: ${body}" />