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.xml81
1 files changed, 64 insertions, 17 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 c17595e18..76f45881a 100644
--- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml
+++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml
@@ -102,35 +102,82 @@
</setBody>
<log
loggingLevel="INFO"
- message="Loop name received: ${body}"></log>
+ message="Receive SUBMIT request for loop: ${body}" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
- <setHeader headerName="LoopObject">
- <method
- ref="org.onap.clamp.loop.LoopService"
- method="getLoop" />
- </setHeader>
- <split streaming="true">
+ <to uri="direct:load-loop" />
+ <log
+ loggingLevel="INFO"
+ message="Processing all MICRO-SERVICES policies defined in loop ${header.LoopObject.getName()}" />
+ <split>
<simple>${header.LoopObject.getMicroServicePolicies()}
</simple>
- <setHeader headerName="HttpQueryException">
+ <setHeader headerName="microServicePolicy">
+ <simple>${body}</simple>
+ </setHeader>
+ <log
+ loggingLevel="INFO"
+ message="Processing Micro Service Policy: ${header.microServicePolicy.getName()}" />
+ <setHeader headerName="HttpQueryExceptionFlag">
+ <simple resultType="java.lang.Boolean">false</simple>
+ </setHeader>
+ <to uri="direct:delete-micro-service-policy" />
+
+ <setHeader headerName="HttpQueryExceptionFlag">
+ <simple resultType="java.lang.Boolean">true</simple>
+ </setHeader>
+ <to uri="direct:create-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="HttpQueryExceptionFlag">
<simple resultType="java.lang.Boolean">false</simple>
</setHeader>
- <to uri="direct:delete-micro-service"/>
-
- <setHeader headerName="HttpQueryException">
+ <to uri="direct:delete-operational-policy" />
+
+ <setHeader headerName="HttpQueryExceptionFlag">
<simple resultType="java.lang.Boolean">true</simple>
</setHeader>
- <setBody>
- <simple>${body.createPolicyPayload()}</simple>
- </setBody>
- <to uri="direct:create-micro-service"/>
+ <to uri="direct:create-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="HttpQueryExceptionFlag">
+ <simple resultType="java.lang.Boolean">false</simple>
+ </setHeader>
+ <to uri="direct:delete-guard-policy" />
+
+ <setHeader headerName="HttpQueryExceptionFlag">
+ <simple resultType="java.lang.Boolean">true</simple>
+ </setHeader>
+ <to uri="direct:create-guard-policy" />
+ </split>
</split>
</route>
</put>
- <put
- uri="/v2/loop/delete/{loopName}">
+ <put uri="/v2/loop/delete/{loopName}">
<route>
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />