blob: 6bd1132cc42e92ed8770375809c38dfe54f7a4b5 [file] [log] [blame]
sebdetdfa86ca2019-04-05 15:15:31 +02001<rests xmlns="http://camel.apache.org/schema/spring">
2 <rest>
3 <get
4 uri="/v2/loop/getAllNames"
5 outType="java.lang.String[]"
6 produces="application/json">
7 <route>
xg353y9ac30702019-04-19 13:55:40 +02008 <doTry>
9 <to
10 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get All ClosedLoop')" />
11 <to
12 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
13 <to
14 uri="bean:org.onap.clamp.loop.LoopController?method=getLoopNames()" />
15 <to
16 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
17 <doCatch>
18 <exception>java.lang.Exception</exception>
19 <handled>
20 <constant>false</constant>
21 </handled>
22 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
23 </doCatch>
24 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +020025 </route>
26 </get>
27 <get
28 uri="/v2/loop/{loopName}"
29 outType="org.onap.clamp.loop.Loop"
30 produces="application/json">
31 <route>
xg353y9ac30702019-04-19 13:55:40 +020032 <doTry>
33 <to
34 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get Closed Loop')" />
35 <to
36 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
37 <to
38 uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
39 <to
40 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
41 <doCatch>
42 <exception>java.lang.Exception</exception>
43 <handled>
44 <constant>false</constant>
45 </handled>
46 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
47 </doCatch>
48 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +020049 </route>
50 </get>
51 <get
52 uri="/v2/loop/svgRepresentation/{loopName}"
53 outType="java.lang.String"
54 produces="application/xml">
55 <route>
xg353y9ac30702019-04-19 13:55:40 +020056 <doTry>
57 <to
58 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get SVG Representation')" />
59 <to
60 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
61 <to
62 uri="bean:org.onap.clamp.loop.LoopController?method=getSVGRepresentation(${header.loopName})" />
63 <to
64 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
65 <doCatch>
66 <exception>java.lang.Exception</exception>
67 <handled>
68 <constant>false</constant>
69 </handled>
70 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
71 </doCatch>
72 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +020073 </route>
74 </get>
michal.banka89695a32019-03-12 13:01:26 +010075
sebdetdfa86ca2019-04-05 15:15:31 +020076 <post
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">
82 <route>
xg353y9ac30702019-04-19 13:55:40 +020083 <doTry>
84 <to
85 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update the global properties')" />
86 <to
87 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
88 <setHeader headerName="GlobalPropertiesJson">
89 <simple>${body}</simple>
90 </setHeader>
91 <to uri="direct:load-loop" />
92 <to
93 uri="bean:org.onap.clamp.loop.LoopController?method=updateGlobalPropertiesJson(${header.loopName},${header.GlobalPropertiesJson})" />
94 <to
95 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Global Properties UPDATED','INFO',${header.LoopObject})" />
96 <to
97 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
98 <doCatch>
99 <exception>java.lang.Exception</exception>
100 <handled>
101 <constant>false</constant>
102 </handled>
103 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
104 </doCatch>
105 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +0200106 </route>
107 </post>
108 <post
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">
114 <route>
xg353y9ac30702019-04-19 13:55:40 +0200115 <doTry>
116 <to
117 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update operational policies')" />
118 <to
119 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
120 <setHeader headerName="OperationalPoliciesArray">
121 <simple>${body}</simple>
122 </setHeader>
123 <to uri="direct:load-loop" />
124 <to
125 uri="bean:org.onap.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${header.OperationalPoliciesArray})" />
126 <to
127 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Operational and Guard policies UPDATED','INFO',${header.LoopObject})" />
128 <to
129 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
130 <doCatch>
131 <exception>java.lang.Exception</exception>
132 <handled>
133 <constant>false</constant>
134 </handled>
135 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
136 </doCatch>
137 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +0200138 </route>
139 </post>
140 <post
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">
146 <route>
xg353y9ac30702019-04-19 13:55:40 +0200147 <doTry>
148 <to
149 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update Microservice policies')" />
150 <to
151 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
152 <setHeader headerName="MicroServicePolicyObject">
153 <simple>${body}</simple>
154 </setHeader>
sebdet667cb722019-04-11 02:07:44 +0200155
xg353y9ac30702019-04-19 13:55:40 +0200156 <to uri="direct:load-loop" />
157 <to
158 uri="bean:org.onap.clamp.loop.LoopController?method=updateMicroservicePolicy(${header.loopName},${header.MicroServicePolicyObject})" />
159 <to
160 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Micro Service policies UPDATED','INFO',${header.LoopObject})" />
161 <to
162 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
163 <doCatch>
164 <exception>java.lang.Exception</exception>
165 <handled>
166 <constant>false</constant>
167 </handled>
168 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
169 </doCatch>
170 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +0200171 </route>
172 </post>
173 <put
174 uri="/v2/loop/deployLoop/{loopName}"
175 outType="org.onap.clamp.loop.Loop"
176 produces="application/json">
177 <route>
xg353y9ac30702019-04-19 13:55:40 +0200178 <doTry>
179 <to
180 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Deploy the closed loop')" />
181 <to
182 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
183 <to
184 uri="bean:org.onap.clamp.operation.LoopOperation?method=deployLoop(*,${header.loopName})" />
185 <to
186 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
187 <doCatch>
188 <exception>java.lang.Exception</exception>
189 <handled>
190 <constant>false</constant>
191 </handled>
192 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
193 </doCatch>
194 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +0200195 </route>
196 </put>
197 <put
198 uri="/v2/loop/undeployLoop/{loopName}"
199 outType="org.onap.clamp.loop.Loop"
200 produces="application/json">
201 <route>
xg353y9ac30702019-04-19 13:55:40 +0200202 <doTry>
203 <to
204 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Undeploy the closed loop')" />
205 <to
206 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
207 <to
208 uri="bean:org.onap.clamp.operation.LoopOperation?method=unDeployLoop(${header.loopName})" />
209 <to
210 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
211 <doCatch>
212 <exception>java.lang.Exception</exception>
213 <handled>
214 <constant>false</constant>
215 </handled>
216 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
217 </doCatch>
218 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +0200219 </route>
220 </put>
sebdet667cb722019-04-11 02:07:44 +0200221 <put
sebdet1efe60f2019-04-11 17:58:36 +0200222 uri="/v2/loop/stop/{loopName}"
223 outType="org.onap.clamp.loop.Loop"
224 produces="application/json">
225 <route>
xg353y9ac30702019-04-19 13:55:40 +0200226 <doTry>
227 <log
228 loggingLevel="INFO"
229 message="Receive STOP request for loop: ${header.loopName}" />
230 <to
231 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Stop the closed loop')" />
232 <to
233 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
234 <to uri="direct:load-loop" />
235
236 <doTry>
237 <to uri="direct:remove-all-policy-from-active-pdp-group" />
238 <doCatch>
239 <exception>java.lang.Exception</exception>
240 <handled>
241 <constant>false</constant>
242 </handled>
243 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
244 </doCatch>
245 </doTry>
246
247
248 <log
249 loggingLevel="INFO"
250 message="STOP request successfully executed for loop: ${body}" />
251 <to
252 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request successfully executed','INFO',${header.LoopObject})" />
253 <to
254 uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
255 <to
256 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
257 <doCatch>
258 <exception>java.lang.Exception</exception>
259 <handled>
260 <constant>false</constant>
261 </handled>
262 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
263 </doCatch>
264 </doTry>
sebdet1efe60f2019-04-11 17:58:36 +0200265 </route>
sebdet1efe60f2019-04-11 17:58:36 +0200266 </put>
267 <put
268 uri="/v2/loop/start/{loopName}"
269 outType="org.onap.clamp.loop.Loop"
270 produces="application/json">
271 <route>
xg353y9ac30702019-04-19 13:55:40 +0200272 <doTry>
273 <log
274 loggingLevel="INFO"
275 message="Receive START request for loop: ${header.loopName}" />
276 <to
277 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Start the closed loop')" />
278 <to
279 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
280 <to uri="direct:load-loop" />
281
282 <doTry>
283 <to uri="direct:add-all-to-active-pdp-group" />
284 <doCatch>
285 <exception>java.lang.Exception</exception>
286 <handled>
287 <constant>false</constant>
288 </handled>
289 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
290 </doCatch>
291 </doTry>
292
293 <log
294 loggingLevel="INFO"
295 message="START request successfully executed for loop: ${body}" />
296 <to
297 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('START request successfully executed','INFO',${header.LoopObject})" />
298 <to
299 uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
300 <to
301 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
302 <doCatch>
303 <exception>java.lang.Exception</exception>
304 <handled>
305 <constant>false</constant>
306 </handled>
307 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
308 </doCatch>
309 </doTry>
sebdet1efe60f2019-04-11 17:58:36 +0200310 </route>
sebdet1efe60f2019-04-11 17:58:36 +0200311 </put>
312 <put
sebdet667cb722019-04-11 02:07:44 +0200313 uri="/v2/loop/submit/{loopName}"
314 outType="org.onap.clamp.loop.Loop"
315 produces="application/json">
sebdetdfa86ca2019-04-05 15:15:31 +0200316 <route>
xg353y9ac30702019-04-19 13:55:40 +0200317 <doTry>
sebdet919ef9d2019-04-08 18:32:26 +0200318 <log
319 loggingLevel="INFO"
xg353y9ac30702019-04-19 13:55:40 +0200320 message="Receive SUBMIT request for loop: ${header.loopName}" />
321 <to
322 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Submit the closed loop')" />
323 <to
324 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
325 <to uri="direct:load-loop" />
326 <to
327 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive SUBMIT request','INFO',${header.LoopObject})" />
sebdetcd64cc42019-04-10 14:07:35 +0200328 <setHeader headerName="RaiseHttpExceptionFlag">
sebdetdfa86ca2019-04-05 15:15:31 +0200329 <simple resultType="java.lang.Boolean">false</simple>
330 </setHeader>
xg353y9ac30702019-04-19 13:55:40 +0200331
332 <doTry>
333 <to uri="direct:remove-all-policy-from-active-pdp-group" />
334 <doCatch>
335 <exception>java.lang.Exception</exception>
336 <handled>
337 <constant>false</constant>
338 </handled>
339 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
340 </doCatch>
341 </doTry>
sebdet919ef9d2019-04-08 18:32:26 +0200342
sebdet919ef9d2019-04-08 18:32:26 +0200343 <log
344 loggingLevel="INFO"
xg353y9ac30702019-04-19 13:55:40 +0200345 message="Processing all MICRO-SERVICES policies defined in loop ${header.LoopObject.getName()}" />
sebdet919ef9d2019-04-08 18:32:26 +0200346 <split>
xg353y9ac30702019-04-19 13:55:40 +0200347 <simple>${header.LoopObject.getMicroServicePolicies()}
sebdet919ef9d2019-04-08 18:32:26 +0200348 </simple>
xg353y9ac30702019-04-19 13:55:40 +0200349 <setHeader headerName="microServicePolicy">
sebdet919ef9d2019-04-08 18:32:26 +0200350 <simple>${body}</simple>
351 </setHeader>
352 <log
353 loggingLevel="INFO"
xg353y9ac30702019-04-19 13:55:40 +0200354 message="Processing Micro Service Policy: ${header.microServicePolicy.getName()}" />
sebdetcd64cc42019-04-10 14:07:35 +0200355 <setHeader headerName="RaiseHttpExceptionFlag">
sebdet919ef9d2019-04-08 18:32:26 +0200356 <simple resultType="java.lang.Boolean">false</simple>
357 </setHeader>
sebdet919ef9d2019-04-08 18:32:26 +0200358
xg353y9ac30702019-04-19 13:55:40 +0200359 <doTry>
360 <to uri="direct:delete-micro-service-policy" />
361 <doCatch>
362 <exception>java.lang.Exception</exception>
363 <handled>
364 <constant>false</constant>
365 </handled>
366 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
367 </doCatch>
368 </doTry>
369
370 <doTry>
371 <to uri="direct:create-micro-service-policy" />
372 <doCatch>
373 <exception>java.lang.Exception</exception>
374 <handled>
375 <constant>false</constant>
376 </handled>
377 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
378 </doCatch>
379 </doTry>
380
sebdet919ef9d2019-04-08 18:32:26 +0200381 </split>
xg353y9ac30702019-04-19 13:55:40 +0200382 <log
383 loggingLevel="INFO"
384 message="Processing all OPERATIONAL policies defined in loop ${header.LoopObject.getName()}" />
385 <split>
386 <simple>${header.LoopObject.getOperationalPolicies()}
387 </simple>
388 <setHeader headerName="operationalPolicy">
389 <simple>${body}</simple>
390 </setHeader>
391 <log
392 loggingLevel="INFO"
393 message="Processing Operational Policy: ${header.operationalPolicy.getName()}" />
394 <setHeader headerName="RaiseHttpExceptionFlag">
395 <simple resultType="java.lang.Boolean">false</simple>
396 </setHeader>
sebdet667cb722019-04-11 02:07:44 +0200397
xg353y9ac30702019-04-19 13:55:40 +0200398 <doTry>
399 <to uri="direct:delete-operational-policy" />
400 <doCatch>
401 <exception>java.lang.Exception</exception>
402 <handled>
403 <constant>false</constant>
404 </handled>
405 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
406 </doCatch>
407 </doTry>
408
409 <doTry>
410 <to uri="direct:create-operational-policy" />
411 <doCatch>
412 <exception>java.lang.Exception</exception>
413 <handled>
414 <constant>false</constant>
415 </handled>
416 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
417 </doCatch>
418 </doTry>
419
420
421 <log
422 loggingLevel="INFO"
423 message="Processing all GUARD policies defined in loop ${header.LoopObject.getName()}" />
424 <split>
425 <simple>${header.operationalPolicy.createGuardPolicyPayloads().entrySet()}
426 </simple>
427 <setHeader headerName="guardPolicy">
428 <simple>${body}</simple>
429 </setHeader>
430 <log
431 loggingLevel="INFO"
432 message="Processing Guard Policy: ${header.guardPolicy.getKey()}" />
433
434 <setHeader headerName="RaiseHttpExceptionFlag">
435 <simple resultType="java.lang.Boolean">false</simple>
436 </setHeader>
437
438 <doTry>
439 <to uri="direct:delete-guard-policy" />
440 <doCatch>
441 <exception>java.lang.Exception</exception>
442 <handled>
443 <constant>false</constant>
444 </handled>
445 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
446 </doCatch>
447 </doTry>
448
449 <doTry>
450 <to uri="direct:create-guard-policy" />
451 <doCatch>
452 <exception>java.lang.Exception</exception>
453 <handled>
454 <constant>false</constant>
455 </handled>
456 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
457 </doCatch>
458 </doTry>
459
460 </split>
461 </split>
462
463
464 <doTry>
465 <to uri="direct:add-all-to-active-pdp-group" />
466 <doCatch>
467 <exception>java.lang.Exception</exception>
468 <handled>
469 <constant>false</constant>
470 </handled>
471 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
472 </doCatch>
473 </doTry>
474
475
476
477 <log
478 loggingLevel="INFO"
479 message="SUBMIT request successfully executed for loop: ${body}" />
480 <to
481 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request successfully executed','INFO',${header.LoopObject})" />
482 <to
483 uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
484 <to
485 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
486 <doCatch>
487 <exception>java.lang.Exception</exception>
488 <handled>
489 <constant>false</constant>
490 </handled>
491 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
492 </doCatch>
493 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +0200494 </route>
495 </put>
sebdet919ef9d2019-04-08 18:32:26 +0200496 <put uri="/v2/loop/delete/{loopName}">
sebdetdfa86ca2019-04-05 15:15:31 +0200497 <route>
xg353y9ac30702019-04-19 13:55:40 +0200498 <doTry>
sebdetcd64cc42019-04-10 14:07:35 +0200499 <log
500 loggingLevel="INFO"
xg353y9ac30702019-04-19 13:55:40 +0200501 message="Receive DELETE request for loop: ${header.loopName}" />
502 <to
503 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Delete the closed loop')" />
504 <to
505 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
506 <to uri="direct:load-loop" />
507 <to
508 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive DELETE request','INFO',${header.LoopObject})" />
sebdet667cb722019-04-11 02:07:44 +0200509
xg353y9ac30702019-04-19 13:55:40 +0200510 <doTry>
511 <to uri="direct:remove-all-policy-from-active-pdp-group" />
512 <doCatch>
513 <exception>java.lang.Exception</exception>
514 <handled>
515 <constant>false</constant>
516 </handled>
517 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
518 </doCatch>
519 </doTry>
sebdetcd64cc42019-04-10 14:07:35 +0200520
xg353y9ac30702019-04-19 13:55:40 +0200521
sebdetcd64cc42019-04-10 14:07:35 +0200522 <split>
xg353y9ac30702019-04-19 13:55:40 +0200523 <simple>${header.LoopObject.getMicroServicePolicies()}
sebdetcd64cc42019-04-10 14:07:35 +0200524 </simple>
xg353y9ac30702019-04-19 13:55:40 +0200525 <setHeader headerName="microServicePolicy">
sebdetcd64cc42019-04-10 14:07:35 +0200526 <simple>${body}</simple>
527 </setHeader>
528 <log
529 loggingLevel="INFO"
xg353y9ac30702019-04-19 13:55:40 +0200530 message="Processing Micro Service Policy: ${header.microServicePolicy.getName()}" />
sebdetcd64cc42019-04-10 14:07:35 +0200531
xg353y9ac30702019-04-19 13:55:40 +0200532 <doTry>
533 <to uri="direct:delete-micro-service-policy" />
534 <doCatch>
535 <exception>java.lang.Exception</exception>
536 <handled>
537 <constant>false</constant>
538 </handled>
539 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
540 </doCatch>
541 </doTry>
542
sebdetcd64cc42019-04-10 14:07:35 +0200543 </split>
xg353y9ac30702019-04-19 13:55:40 +0200544
545 <log
546 loggingLevel="INFO"
547 message="Processing all OPERATIONAL policies defined in loop ${header.LoopObject.getName()}" />
548 <split>
549 <simple>${header.LoopObject.getOperationalPolicies()}
550 </simple>
551 <setHeader headerName="operationalPolicy">
552 <simple>${body}</simple>
553 </setHeader>
554 <log
555 loggingLevel="INFO"
556 message="Processing Operational Policy: ${header.operationalPolicy.getName()}" />
557
558 <doTry>
559 <to uri="direct:delete-operational-policy" />
560 <doCatch>
561 <exception>java.lang.Exception</exception>
562 <handled>
563 <constant>false</constant>
564 </handled>
565 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
566 </doCatch>
567 </doTry>
568
569 <log
570 loggingLevel="INFO"
571 message="Processing all GUARD policies defined in loop ${header.LoopObject.getName()}" />
572 <split>
573 <simple>${header.operationalPolicy.createGuardPolicyPayloads().entrySet()}
574 </simple>
575 <setHeader headerName="guardPolicy">
576 <simple>${body}</simple>
577 </setHeader>
578 <log
579 loggingLevel="INFO"
580 message="Processing Guard Policy: ${header.guardPolicy.getKey()}" />
581
582 <doTry>
583 <to uri="direct:delete-guard-policy" />
584 <doCatch>
585 <exception>java.lang.Exception</exception>
586 <handled>
587 <constant>false</constant>
588 </handled>
589 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
590 </doCatch>
591 </doTry>
592
593 </split>
594 </split>
595 <to
596 uri="bean:org.onap.clamp.loop.log.LoopService?method=deleteLoop(${header.loopName})" />
597 <log
598 loggingLevel="INFO"
599 message="DELETE request successfully executed for loop: ${body}" />
600 <to
601 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request successfully executed','INFO',${header.LoopObject})" />
602 <to
603 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
604 <doCatch>
605 <exception>java.lang.Exception</exception>
606 <handled>
607 <constant>false</constant>
608 </handled>
609 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
610 </doCatch>
611 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +0200612 </route>
613 </put>
614 </rest>
Krysiak Adam5f14c7a2019-03-01 15:32:19 +0100615</rests>