1 <rests xmlns="http://camel.apache.org/schema/spring">
4 uri="/v2/loop/getAllNames"
5 outType="java.lang.String[]"
6 produces="application/json">
10 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get All ClosedLoop')" />
12 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
14 uri="bean:org.onap.clamp.loop.LoopController?method=getLoopNames()" />
16 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
18 <exception>java.lang.Exception</exception>
20 <constant>false</constant>
22 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
28 uri="/v2/loop/{loopName}"
29 outType="org.onap.clamp.loop.Loop"
30 produces="application/json">
34 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get Closed Loop')" />
36 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
38 uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
40 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
42 <exception>java.lang.Exception</exception>
44 <constant>false</constant>
46 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
52 uri="/v2/loop/svgRepresentation/{loopName}"
53 outType="java.lang.String"
54 produces="application/xml">
58 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get SVG Representation')" />
60 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
62 uri="bean:org.onap.clamp.loop.LoopController?method=getSVGRepresentation(${header.loopName})" />
64 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
66 <exception>java.lang.Exception</exception>
68 <constant>false</constant>
70 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
77 uri="/v2/loop/updateGlobalProperties/{loopName}"
78 type="com.google.gson.JsonObject"
79 consumes="application/json"
80 outType="org.onap.clamp.loop.Loop"
81 produces="application/json">
85 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update the global properties')" />
87 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
88 <setHeader headerName="GlobalPropertiesJson">
89 <simple>${body}</simple>
91 <to uri="direct:load-loop" />
93 uri="bean:org.onap.clamp.loop.LoopController?method=updateGlobalPropertiesJson(${header.loopName},${header.GlobalPropertiesJson})" />
95 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Global Properties UPDATED','INFO',${header.LoopObject})" />
97 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
99 <exception>java.lang.Exception</exception>
101 <constant>false</constant>
103 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
109 uri="/v2/loop/updateOperationalPolicies/{loopName}"
110 type="com.google.gson.JsonArray"
111 consumes="application/json"
112 outType="org.onap.clamp.loop.Loop"
113 produces="application/json">
117 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update operational policies')" />
119 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
120 <setHeader headerName="OperationalPoliciesArray">
121 <simple>${body}</simple>
123 <to uri="direct:load-loop" />
125 uri="bean:org.onap.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${header.OperationalPoliciesArray})" />
127 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Operational and Guard policies UPDATED','INFO',${header.LoopObject})" />
129 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
131 <exception>java.lang.Exception</exception>
133 <constant>false</constant>
135 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
141 uri="/v2/loop/updateMicroservicePolicy/{loopName}"
142 type="org.onap.clamp.policy.microservice.MicroServicePolicy"
143 consumes="application/json"
144 outType="org.onap.clamp.policy.microservice.MicroServicePolicy"
145 produces="application/json">
149 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update Microservice policies')" />
151 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
152 <setHeader headerName="MicroServicePolicyObject">
153 <simple>${body}</simple>
156 <to uri="direct:load-loop" />
158 uri="bean:org.onap.clamp.loop.LoopController?method=updateMicroservicePolicy(${header.loopName},${header.MicroServicePolicyObject})" />
160 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Micro Service policies UPDATED','INFO',${header.LoopObject})" />
162 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
164 <exception>java.lang.Exception</exception>
166 <constant>false</constant>
168 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
174 uri="/v2/loop/deployLoop/{loopName}"
175 outType="org.onap.clamp.loop.Loop"
176 produces="application/json">
180 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Deploy the closed loop')" />
182 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
184 uri="bean:org.onap.clamp.operation.LoopOperation?method=deployLoop(*,${header.loopName})" />
186 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
188 <exception>java.lang.Exception</exception>
190 <constant>false</constant>
192 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
198 uri="/v2/loop/undeployLoop/{loopName}"
199 outType="org.onap.clamp.loop.Loop"
200 produces="application/json">
204 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Undeploy the closed loop')" />
206 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
208 uri="bean:org.onap.clamp.operation.LoopOperation?method=unDeployLoop(${header.loopName})" />
210 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
212 <exception>java.lang.Exception</exception>
214 <constant>false</constant>
216 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
222 uri="/v2/loop/stop/{loopName}"
223 outType="org.onap.clamp.loop.Loop"
224 produces="application/json">
229 message="Receive STOP request for loop: ${header.loopName}" />
231 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Stop the closed loop')" />
233 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
234 <to uri="direct:load-loop" />
237 <to uri="direct:remove-all-policy-from-active-pdp-group" />
239 <exception>java.lang.Exception</exception>
241 <constant>false</constant>
243 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
250 message="STOP request successfully executed for loop: ${body}" />
252 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request successfully executed','INFO',${header.LoopObject})" />
254 uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
256 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
258 <exception>java.lang.Exception</exception>
260 <constant>false</constant>
262 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
268 uri="/v2/loop/start/{loopName}"
269 outType="org.onap.clamp.loop.Loop"
270 produces="application/json">
275 message="Receive START request for loop: ${header.loopName}" />
277 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Start the closed loop')" />
279 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
280 <to uri="direct:load-loop" />
283 <to uri="direct:add-all-to-active-pdp-group" />
285 <exception>java.lang.Exception</exception>
287 <constant>false</constant>
289 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
295 message="START request successfully executed for loop: ${body}" />
297 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('START request successfully executed','INFO',${header.LoopObject})" />
299 uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
301 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
303 <exception>java.lang.Exception</exception>
305 <constant>false</constant>
307 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
313 uri="/v2/loop/submit/{loopName}"
314 outType="org.onap.clamp.loop.Loop"
315 produces="application/json">
320 message="Receive SUBMIT request for loop: ${header.loopName}" />
322 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Submit the closed loop')" />
324 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
325 <to uri="direct:load-loop" />
327 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive SUBMIT request','INFO',${header.LoopObject})" />
328 <setHeader headerName="RaiseHttpExceptionFlag">
329 <simple resultType="java.lang.Boolean">false</simple>
333 <to uri="direct:remove-all-policy-from-active-pdp-group" />
335 <exception>java.lang.Exception</exception>
337 <constant>false</constant>
339 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
345 message="Processing all MICRO-SERVICES policies defined in loop ${header.LoopObject.getName()}" />
347 <simple>${header.LoopObject.getMicroServicePolicies()}
349 <setHeader headerName="microServicePolicy">
350 <simple>${body}</simple>
354 message="Processing Micro Service Policy: ${header.microServicePolicy.getName()}" />
355 <setHeader headerName="RaiseHttpExceptionFlag">
356 <simple resultType="java.lang.Boolean">false</simple>
360 <to uri="direct:delete-micro-service-policy" />
362 <exception>java.lang.Exception</exception>
364 <constant>false</constant>
366 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
371 <to uri="direct:create-micro-service-policy" />
373 <exception>java.lang.Exception</exception>
375 <constant>false</constant>
377 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
384 message="Processing all OPERATIONAL policies defined in loop ${header.LoopObject.getName()}" />
386 <simple>${header.LoopObject.getOperationalPolicies()}
388 <setHeader headerName="operationalPolicy">
389 <simple>${body}</simple>
393 message="Processing Operational Policy: ${header.operationalPolicy.getName()}" />
394 <setHeader headerName="RaiseHttpExceptionFlag">
395 <simple resultType="java.lang.Boolean">false</simple>
399 <to uri="direct:delete-operational-policy" />
401 <exception>java.lang.Exception</exception>
403 <constant>false</constant>
405 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
410 <to uri="direct:create-operational-policy" />
412 <exception>java.lang.Exception</exception>
414 <constant>false</constant>
416 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
423 message="Processing all GUARD policies defined in loop ${header.LoopObject.getName()}" />
425 <simple>${header.operationalPolicy.createGuardPolicyPayloads().entrySet()}
427 <setHeader headerName="guardPolicy">
428 <simple>${body}</simple>
432 message="Processing Guard Policy: ${header.guardPolicy.getKey()}" />
434 <setHeader headerName="RaiseHttpExceptionFlag">
435 <simple resultType="java.lang.Boolean">false</simple>
439 <to uri="direct:delete-guard-policy" />
441 <exception>java.lang.Exception</exception>
443 <constant>false</constant>
445 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
450 <to uri="direct:create-guard-policy" />
452 <exception>java.lang.Exception</exception>
454 <constant>false</constant>
456 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
465 <to uri="direct:add-all-to-active-pdp-group" />
467 <exception>java.lang.Exception</exception>
469 <constant>false</constant>
471 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
479 message="SUBMIT request successfully executed for loop: ${body}" />
481 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request successfully executed','INFO',${header.LoopObject})" />
483 uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
485 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
487 <exception>java.lang.Exception</exception>
489 <constant>false</constant>
491 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
496 <put uri="/v2/loop/delete/{loopName}">
501 message="Receive DELETE request for loop: ${header.loopName}" />
503 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Delete the closed loop')" />
505 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
506 <to uri="direct:load-loop" />
508 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive DELETE request','INFO',${header.LoopObject})" />
511 <to uri="direct:remove-all-policy-from-active-pdp-group" />
513 <exception>java.lang.Exception</exception>
515 <constant>false</constant>
517 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
523 <simple>${header.LoopObject.getMicroServicePolicies()}
525 <setHeader headerName="microServicePolicy">
526 <simple>${body}</simple>
530 message="Processing Micro Service Policy: ${header.microServicePolicy.getName()}" />
533 <to uri="direct:delete-micro-service-policy" />
535 <exception>java.lang.Exception</exception>
537 <constant>false</constant>
539 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
547 message="Processing all OPERATIONAL policies defined in loop ${header.LoopObject.getName()}" />
549 <simple>${header.LoopObject.getOperationalPolicies()}
551 <setHeader headerName="operationalPolicy">
552 <simple>${body}</simple>
556 message="Processing Operational Policy: ${header.operationalPolicy.getName()}" />
559 <to uri="direct:delete-operational-policy" />
561 <exception>java.lang.Exception</exception>
563 <constant>false</constant>
565 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
571 message="Processing all GUARD policies defined in loop ${header.LoopObject.getName()}" />
573 <simple>${header.operationalPolicy.createGuardPolicyPayloads().entrySet()}
575 <setHeader headerName="guardPolicy">
576 <simple>${body}</simple>
580 message="Processing Guard Policy: ${header.guardPolicy.getKey()}" />
583 <to uri="direct:delete-guard-policy" />
585 <exception>java.lang.Exception</exception>
587 <constant>false</constant>
589 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
596 uri="bean:org.onap.clamp.loop.log.LoopService?method=deleteLoop(${header.loopName})" />
599 message="DELETE request successfully executed for loop: ${body}" />
601 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request successfully executed','INFO',${header.LoopObject})" />
603 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
605 <exception>java.lang.Exception</exception>
607 <constant>false</constant>
609 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />