blob: bc1a07feb259ab9583a939dd6826d8fe627c466e [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>
sebdet338c2182019-04-25 12:33:31 +02008 <removeHeaders pattern="*"/>
9 <doTry>
10 <to
xg353y9ac30702019-04-19 13:55:40 +020011 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get All ClosedLoop')" />
12 <to
13 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
14 <to
15 uri="bean:org.onap.clamp.loop.LoopController?method=getLoopNames()" />
16 <to
17 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
sebdet338c2182019-04-25 12:33:31 +020018 <doCatch>
19 <exception>java.lang.Exception</exception>
20 <handled>
21 <constant>false</constant>
22 </handled>
23 <to
24 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
25 </doCatch>
26 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +020027 </route>
28 </get>
29 <get
30 uri="/v2/loop/{loopName}"
31 outType="org.onap.clamp.loop.Loop"
32 produces="application/json">
33 <route>
sebdet338c2182019-04-25 12:33:31 +020034 <removeHeaders pattern="*" excludePattern="loopName"/>
xg353y9ac30702019-04-19 13:55:40 +020035 <doTry>
sebdet338c2182019-04-25 12:33:31 +020036 <to
xg353y9ac30702019-04-19 13:55:40 +020037 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get Closed Loop')" />
38 <to
39 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
40 <to
41 uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
42 <to
43 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
sebdet338c2182019-04-25 12:33:31 +020044 <doCatch>
45 <exception>java.lang.Exception</exception>
46 <handled>
47 <constant>false</constant>
48 </handled>
49 <to
50 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
51 </doCatch>
52 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +020053 </route>
54 </get>
55 <get
56 uri="/v2/loop/svgRepresentation/{loopName}"
57 outType="java.lang.String"
58 produces="application/xml">
59 <route>
sebdet338c2182019-04-25 12:33:31 +020060 <removeHeaders pattern="*" excludePattern="loopName"/>
xg353y9ac30702019-04-19 13:55:40 +020061 <doTry>
sebdet338c2182019-04-25 12:33:31 +020062 <to
xg353y9ac30702019-04-19 13:55:40 +020063 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get SVG Representation')" />
64 <to
65 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
66 <to
67 uri="bean:org.onap.clamp.loop.LoopController?method=getSVGRepresentation(${header.loopName})" />
68 <to
69 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
sebdet338c2182019-04-25 12:33:31 +020070 <doCatch>
71 <exception>java.lang.Exception</exception>
72 <handled>
73 <constant>false</constant>
74 </handled>
75 <to
76 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
77 </doCatch>
78 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +020079 </route>
80 </get>
michal.banka89695a32019-03-12 13:01:26 +010081
sebdetdfa86ca2019-04-05 15:15:31 +020082 <post
83 uri="/v2/loop/updateGlobalProperties/{loopName}"
84 type="com.google.gson.JsonObject"
85 consumes="application/json"
86 outType="org.onap.clamp.loop.Loop"
87 produces="application/json">
88 <route>
sebdet338c2182019-04-25 12:33:31 +020089 <removeHeaders pattern="*" excludePattern="loopName"/>
xg353y9ac30702019-04-19 13:55:40 +020090 <doTry>
sebdet338c2182019-04-25 12:33:31 +020091 <to
xg353y9ac30702019-04-19 13:55:40 +020092 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update the global properties')" />
93 <to
94 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
95 <setHeader headerName="GlobalPropertiesJson">
96 <simple>${body}</simple>
97 </setHeader>
98 <to uri="direct:load-loop" />
99 <to
100 uri="bean:org.onap.clamp.loop.LoopController?method=updateGlobalPropertiesJson(${header.loopName},${header.GlobalPropertiesJson})" />
101 <to
sebdet338c2182019-04-25 12:33:31 +0200102 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Global Properties UPDATED','INFO',${exchangeProperty[loopObject]})" />
xg353y9ac30702019-04-19 13:55:40 +0200103 <to
104 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
sebdet338c2182019-04-25 12:33:31 +0200105 <doCatch>
106 <exception>java.lang.Exception</exception>
107 <handled>
108 <constant>false</constant>
109 </handled>
110 <to
111 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
112 </doCatch>
113 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +0200114 </route>
115 </post>
116 <post
117 uri="/v2/loop/updateOperationalPolicies/{loopName}"
118 type="com.google.gson.JsonArray"
119 consumes="application/json"
120 outType="org.onap.clamp.loop.Loop"
121 produces="application/json">
122 <route>
sebdet338c2182019-04-25 12:33:31 +0200123 <removeHeaders pattern="*" excludePattern="loopName"/>
xg353y9ac30702019-04-19 13:55:40 +0200124 <doTry>
sebdet338c2182019-04-25 12:33:31 +0200125 <to
xg353y9ac30702019-04-19 13:55:40 +0200126 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update operational policies')" />
127 <to
128 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
129 <setHeader headerName="OperationalPoliciesArray">
130 <simple>${body}</simple>
131 </setHeader>
132 <to uri="direct:load-loop" />
133 <to
134 uri="bean:org.onap.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${header.OperationalPoliciesArray})" />
135 <to
sebdet338c2182019-04-25 12:33:31 +0200136 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Operational and Guard policies UPDATED','INFO',${exchangeProperty[loopObject]})" />
xg353y9ac30702019-04-19 13:55:40 +0200137 <to
138 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
sebdet338c2182019-04-25 12:33:31 +0200139 <doCatch>
140 <exception>java.lang.Exception</exception>
141 <handled>
142 <constant>false</constant>
143 </handled>
144 <to
145 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
146 </doCatch>
147 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +0200148 </route>
149 </post>
150 <post
151 uri="/v2/loop/updateMicroservicePolicy/{loopName}"
152 type="org.onap.clamp.policy.microservice.MicroServicePolicy"
153 consumes="application/json"
154 outType="org.onap.clamp.policy.microservice.MicroServicePolicy"
155 produces="application/json">
156 <route>
sebdet338c2182019-04-25 12:33:31 +0200157 <removeHeaders pattern="*" excludePattern="loopName"/>
xg353y9ac30702019-04-19 13:55:40 +0200158 <doTry>
sebdet338c2182019-04-25 12:33:31 +0200159 <to
xg353y9ac30702019-04-19 13:55:40 +0200160 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update Microservice policies')" />
161 <to
162 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
sebdet338c2182019-04-25 12:33:31 +0200163 <setProperty propertyName="MicroServicePolicyObject">
xg353y9ac30702019-04-19 13:55:40 +0200164 <simple>${body}</simple>
sebdet338c2182019-04-25 12:33:31 +0200165 </setProperty>
sebdet667cb722019-04-11 02:07:44 +0200166
xg353y9ac30702019-04-19 13:55:40 +0200167 <to uri="direct:load-loop" />
168 <to
sebdet338c2182019-04-25 12:33:31 +0200169 uri="bean:org.onap.clamp.loop.LoopController?method=updateMicroservicePolicy(${header.loopName},${exchangeProperty[MicroServicePolicyObject]})" />
xg353y9ac30702019-04-19 13:55:40 +0200170 <to
sebdet338c2182019-04-25 12:33:31 +0200171 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Micro Service policies UPDATED','INFO',${exchangeProperty[loopObject]})" />
xg353y9ac30702019-04-19 13:55:40 +0200172 <to
173 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
sebdet338c2182019-04-25 12:33:31 +0200174 <doCatch>
175 <exception>java.lang.Exception</exception>
176 <handled>
177 <constant>false</constant>
178 </handled>
179 <to
180 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
181 </doCatch>
182 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +0200183 </route>
184 </post>
185 <put
186 uri="/v2/loop/deployLoop/{loopName}"
187 outType="org.onap.clamp.loop.Loop"
188 produces="application/json">
189 <route>
sebdet338c2182019-04-25 12:33:31 +0200190 <removeHeaders pattern="*" excludePattern="loopName"/>
xg353y9ac30702019-04-19 13:55:40 +0200191 <doTry>
sebdet338c2182019-04-25 12:33:31 +0200192 <to
xg353y9ac30702019-04-19 13:55:40 +0200193 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Deploy the closed loop')" />
194 <to
195 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
196 <to
197 uri="bean:org.onap.clamp.operation.LoopOperation?method=deployLoop(*,${header.loopName})" />
198 <to
199 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
sebdet338c2182019-04-25 12:33:31 +0200200 <doCatch>
201 <exception>java.lang.Exception</exception>
202 <handled>
203 <constant>false</constant>
204 </handled>
205 <to
206 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
207 </doCatch>
208 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +0200209 </route>
210 </put>
211 <put
212 uri="/v2/loop/undeployLoop/{loopName}"
213 outType="org.onap.clamp.loop.Loop"
214 produces="application/json">
215 <route>
sebdet338c2182019-04-25 12:33:31 +0200216 <removeHeaders pattern="*" excludePattern="loopName"/>
xg353y9ac30702019-04-19 13:55:40 +0200217 <doTry>
sebdet338c2182019-04-25 12:33:31 +0200218 <to
xg353y9ac30702019-04-19 13:55:40 +0200219 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Undeploy the closed loop')" />
220 <to
221 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
222 <to
223 uri="bean:org.onap.clamp.operation.LoopOperation?method=unDeployLoop(${header.loopName})" />
224 <to
225 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
sebdet338c2182019-04-25 12:33:31 +0200226 <doCatch>
227 <exception>java.lang.Exception</exception>
228 <handled>
229 <constant>false</constant>
230 </handled>
231 <to
232 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
233 </doCatch>
234 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +0200235 </route>
236 </put>
sebdet667cb722019-04-11 02:07:44 +0200237 <put
sebdet1efe60f2019-04-11 17:58:36 +0200238 uri="/v2/loop/stop/{loopName}"
239 outType="org.onap.clamp.loop.Loop"
240 produces="application/json">
241 <route>
sebdet338c2182019-04-25 12:33:31 +0200242 <removeHeaders pattern="*" excludePattern="loopName"/>
xg353y9ac30702019-04-19 13:55:40 +0200243 <doTry>
244 <log
245 loggingLevel="INFO"
246 message="Receive STOP request for loop: ${header.loopName}" />
sebdet338c2182019-04-25 12:33:31 +0200247 <to
xg353y9ac30702019-04-19 13:55:40 +0200248 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Stop the closed loop')" />
249 <to
250 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
251 <to uri="direct:load-loop" />
252
sebdet338c2182019-04-25 12:33:31 +0200253 <doTry>
xg353y9ac30702019-04-19 13:55:40 +0200254 <to uri="direct:remove-all-policy-from-active-pdp-group" />
255 <doCatch>
sebdet338c2182019-04-25 12:33:31 +0200256 <exception>java.lang.Exception</exception>
257 <handled>
258 <constant>false</constant>
259 </handled>
260 <to
261 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
262 </doCatch>
xg353y9ac30702019-04-19 13:55:40 +0200263 </doTry>
264
265
266 <log
267 loggingLevel="INFO"
268 message="STOP request successfully executed for loop: ${body}" />
269 <to
sebdet338c2182019-04-25 12:33:31 +0200270 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request successfully executed','INFO',${exchangeProperty[loopObject]})" />
xg353y9ac30702019-04-19 13:55:40 +0200271 <to
272 uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
273 <to
274 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
sebdet338c2182019-04-25 12:33:31 +0200275 <doCatch>
276 <exception>java.lang.Exception</exception>
277 <handled>
278 <constant>false</constant>
279 </handled>
280 <to
281 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
282 </doCatch>
283 </doTry>
sebdet1efe60f2019-04-11 17:58:36 +0200284 </route>
sebdet1efe60f2019-04-11 17:58:36 +0200285 </put>
286 <put
287 uri="/v2/loop/start/{loopName}"
288 outType="org.onap.clamp.loop.Loop"
289 produces="application/json">
290 <route>
sebdet338c2182019-04-25 12:33:31 +0200291 <removeHeaders pattern="*" excludePattern="loopName"/>
xg353y9ac30702019-04-19 13:55:40 +0200292 <doTry>
293 <log
294 loggingLevel="INFO"
295 message="Receive START request for loop: ${header.loopName}" />
sebdet338c2182019-04-25 12:33:31 +0200296 <to
xg353y9ac30702019-04-19 13:55:40 +0200297 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Start the closed loop')" />
298 <to
299 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
300 <to uri="direct:load-loop" />
sebdet338c2182019-04-25 12:33:31 +0200301
302 <doTry>
xg353y9ac30702019-04-19 13:55:40 +0200303 <to uri="direct:add-all-to-active-pdp-group" />
304 <doCatch>
sebdet338c2182019-04-25 12:33:31 +0200305 <exception>java.lang.Exception</exception>
306 <handled>
307 <constant>false</constant>
308 </handled>
309 <to
310 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
311 </doCatch>
xg353y9ac30702019-04-19 13:55:40 +0200312 </doTry>
313
314 <log
315 loggingLevel="INFO"
316 message="START request successfully executed for loop: ${body}" />
317 <to
sebdet338c2182019-04-25 12:33:31 +0200318 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('START request successfully executed','INFO',${exchangeProperty[loopObject]})" />
xg353y9ac30702019-04-19 13:55:40 +0200319 <to
320 uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
321 <to
322 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
sebdet338c2182019-04-25 12:33:31 +0200323 <doCatch>
324 <exception>java.lang.Exception</exception>
325 <handled>
326 <constant>false</constant>
327 </handled>
328 <to
329 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
330 </doCatch>
331 </doTry>
sebdet1efe60f2019-04-11 17:58:36 +0200332 </route>
sebdet1efe60f2019-04-11 17:58:36 +0200333 </put>
334 <put
sebdet667cb722019-04-11 02:07:44 +0200335 uri="/v2/loop/submit/{loopName}"
336 outType="org.onap.clamp.loop.Loop"
337 produces="application/json">
sebdetdfa86ca2019-04-05 15:15:31 +0200338 <route>
sebdet338c2182019-04-25 12:33:31 +0200339 <removeHeaders pattern="*" excludePattern="loopName"/>
xg353y9ac30702019-04-19 13:55:40 +0200340 <doTry>
sebdet919ef9d2019-04-08 18:32:26 +0200341 <log
342 loggingLevel="INFO"
xg353y9ac30702019-04-19 13:55:40 +0200343 message="Receive SUBMIT request for loop: ${header.loopName}" />
sebdet338c2182019-04-25 12:33:31 +0200344 <to
345 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Submit the closed loop')" />
xg353y9ac30702019-04-19 13:55:40 +0200346 <to
347 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
348 <to uri="direct:load-loop" />
349 <to
sebdet338c2182019-04-25 12:33:31 +0200350 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive SUBMIT request','INFO',${exchangeProperty[loopObject]})" />
351 <setProperty propertyName="raiseHttpExceptionFlag">
sebdetdfa86ca2019-04-05 15:15:31 +0200352 <simple resultType="java.lang.Boolean">false</simple>
sebdet338c2182019-04-25 12:33:31 +0200353 </setProperty>
354
355 <doTry>
xg353y9ac30702019-04-19 13:55:40 +0200356 <to uri="direct:remove-all-policy-from-active-pdp-group" />
357 <doCatch>
sebdet338c2182019-04-25 12:33:31 +0200358 <exception>java.lang.Exception</exception>
359 <handled>
360 <constant>false</constant>
361 </handled>
362 <to
363 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
364 </doCatch>
xg353y9ac30702019-04-19 13:55:40 +0200365 </doTry>
sebdet919ef9d2019-04-08 18:32:26 +0200366
sebdet919ef9d2019-04-08 18:32:26 +0200367 <log
368 loggingLevel="INFO"
sebdet338c2182019-04-25 12:33:31 +0200369 message="Processing all MICRO-SERVICES policies defined in loop ${exchangeProperty[loopObject].getName()}" />
sebdet919ef9d2019-04-08 18:32:26 +0200370 <split>
sebdet338c2182019-04-25 12:33:31 +0200371 <simple>${exchangeProperty[loopObject].getMicroServicePolicies()}
sebdet919ef9d2019-04-08 18:32:26 +0200372 </simple>
sebdet338c2182019-04-25 12:33:31 +0200373 <setProperty propertyName="microServicePolicy">
sebdet919ef9d2019-04-08 18:32:26 +0200374 <simple>${body}</simple>
sebdet338c2182019-04-25 12:33:31 +0200375 </setProperty>
sebdet919ef9d2019-04-08 18:32:26 +0200376 <log
377 loggingLevel="INFO"
sebdet338c2182019-04-25 12:33:31 +0200378 message="Processing Micro Service Policy: ${exchangeProperty[microServicePolicy].getName()}" />
379 <setProperty propertyName="raiseHttpExceptionFlag">
sebdet919ef9d2019-04-08 18:32:26 +0200380 <simple resultType="java.lang.Boolean">false</simple>
sebdet338c2182019-04-25 12:33:31 +0200381 </setProperty>
sebdet919ef9d2019-04-08 18:32:26 +0200382
sebdet338c2182019-04-25 12:33:31 +0200383 <doTry>
xg353y9ac30702019-04-19 13:55:40 +0200384 <to uri="direct:delete-micro-service-policy" />
385 <doCatch>
sebdet338c2182019-04-25 12:33:31 +0200386 <exception>java.lang.Exception</exception>
387 <handled>
388 <constant>false</constant>
389 </handled>
390 <to
391 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
392 </doCatch>
xg353y9ac30702019-04-19 13:55:40 +0200393 </doTry>
394
sebdet338c2182019-04-25 12:33:31 +0200395 <doTry>
xg353y9ac30702019-04-19 13:55:40 +0200396 <to uri="direct:create-micro-service-policy" />
397 <doCatch>
sebdet338c2182019-04-25 12:33:31 +0200398 <exception>java.lang.Exception</exception>
399 <handled>
400 <constant>false</constant>
401 </handled>
402 <to
403 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
404 </doCatch>
xg353y9ac30702019-04-19 13:55:40 +0200405 </doTry>
sebdet338c2182019-04-25 12:33:31 +0200406
sebdet919ef9d2019-04-08 18:32:26 +0200407 </split>
xg353y9ac30702019-04-19 13:55:40 +0200408 <log
409 loggingLevel="INFO"
sebdet338c2182019-04-25 12:33:31 +0200410 message="Processing all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}" />
xg353y9ac30702019-04-19 13:55:40 +0200411 <split>
sebdet338c2182019-04-25 12:33:31 +0200412 <simple>${exchangeProperty[loopObject].getOperationalPolicies()}
xg353y9ac30702019-04-19 13:55:40 +0200413 </simple>
sebdet338c2182019-04-25 12:33:31 +0200414 <setProperty propertyName="operationalPolicy">
xg353y9ac30702019-04-19 13:55:40 +0200415 <simple>${body}</simple>
sebdet338c2182019-04-25 12:33:31 +0200416 </setProperty>
xg353y9ac30702019-04-19 13:55:40 +0200417 <log
418 loggingLevel="INFO"
sebdet338c2182019-04-25 12:33:31 +0200419 message="Processing Operational Policy: ${exchangeProperty[operationalPolicy].getName()}" />
420 <setProperty propertyName="raiseHttpExceptionFlag">
xg353y9ac30702019-04-19 13:55:40 +0200421 <simple resultType="java.lang.Boolean">false</simple>
sebdet338c2182019-04-25 12:33:31 +0200422 </setProperty>
sebdet667cb722019-04-11 02:07:44 +0200423
sebdet338c2182019-04-25 12:33:31 +0200424 <doTry>
xg353y9ac30702019-04-19 13:55:40 +0200425 <to uri="direct:delete-operational-policy" />
426 <doCatch>
sebdet338c2182019-04-25 12:33:31 +0200427 <exception>java.lang.Exception</exception>
428 <handled>
429 <constant>false</constant>
430 </handled>
431 <to
432 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
433 </doCatch>
xg353y9ac30702019-04-19 13:55:40 +0200434 </doTry>
435
sebdet338c2182019-04-25 12:33:31 +0200436 <doTry>
xg353y9ac30702019-04-19 13:55:40 +0200437 <to uri="direct:create-operational-policy" />
438 <doCatch>
sebdet338c2182019-04-25 12:33:31 +0200439 <exception>java.lang.Exception</exception>
440 <handled>
441 <constant>false</constant>
442 </handled>
443 <to
444 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
445 </doCatch>
xg353y9ac30702019-04-19 13:55:40 +0200446 </doTry>
447
sebdet338c2182019-04-25 12:33:31 +0200448
xg353y9ac30702019-04-19 13:55:40 +0200449 <log
450 loggingLevel="INFO"
sebdet338c2182019-04-25 12:33:31 +0200451 message="Processing all GUARD policies defined in loop ${exchangeProperty[loopObject].getName()}" />
xg353y9ac30702019-04-19 13:55:40 +0200452 <split>
sebdet338c2182019-04-25 12:33:31 +0200453 <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()}
xg353y9ac30702019-04-19 13:55:40 +0200454 </simple>
sebdet338c2182019-04-25 12:33:31 +0200455 <setProperty propertyName="guardPolicy">
xg353y9ac30702019-04-19 13:55:40 +0200456 <simple>${body}</simple>
sebdet338c2182019-04-25 12:33:31 +0200457 </setProperty>
xg353y9ac30702019-04-19 13:55:40 +0200458 <log
459 loggingLevel="INFO"
sebdet338c2182019-04-25 12:33:31 +0200460 message="Processing Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" />
xg353y9ac30702019-04-19 13:55:40 +0200461
sebdet338c2182019-04-25 12:33:31 +0200462 <setProperty propertyName="raiseHttpExceptionFlag">
xg353y9ac30702019-04-19 13:55:40 +0200463 <simple resultType="java.lang.Boolean">false</simple>
sebdet338c2182019-04-25 12:33:31 +0200464 </setProperty>
465
466 <doTry>
xg353y9ac30702019-04-19 13:55:40 +0200467 <to uri="direct:delete-guard-policy" />
468 <doCatch>
sebdet338c2182019-04-25 12:33:31 +0200469 <exception>java.lang.Exception</exception>
470 <handled>
471 <constant>false</constant>
472 </handled>
473 <to
474 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
475 </doCatch>
xg353y9ac30702019-04-19 13:55:40 +0200476 </doTry>
477
sebdet338c2182019-04-25 12:33:31 +0200478 <doTry>
xg353y9ac30702019-04-19 13:55:40 +0200479 <to uri="direct:create-guard-policy" />
480 <doCatch>
sebdet338c2182019-04-25 12:33:31 +0200481 <exception>java.lang.Exception</exception>
482 <handled>
483 <constant>false</constant>
484 </handled>
485 <to
486 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
487 </doCatch>
xg353y9ac30702019-04-19 13:55:40 +0200488 </doTry>
489
490 </split>
491 </split>
sebdet338c2182019-04-25 12:33:31 +0200492
493
494 <doTry>
xg353y9ac30702019-04-19 13:55:40 +0200495 <to uri="direct:add-all-to-active-pdp-group" />
496 <doCatch>
sebdet338c2182019-04-25 12:33:31 +0200497 <exception>java.lang.Exception</exception>
498 <handled>
499 <constant>false</constant>
500 </handled>
501 <to
502 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
503 </doCatch>
xg353y9ac30702019-04-19 13:55:40 +0200504 </doTry>
sebdet338c2182019-04-25 12:33:31 +0200505
xg353y9ac30702019-04-19 13:55:40 +0200506
507
508 <log
509 loggingLevel="INFO"
510 message="SUBMIT request successfully executed for loop: ${body}" />
511 <to
sebdet338c2182019-04-25 12:33:31 +0200512 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request successfully executed','INFO',${exchangeProperty[loopObject]})" />
xg353y9ac30702019-04-19 13:55:40 +0200513 <to
514 uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
515 <to
516 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
sebdet338c2182019-04-25 12:33:31 +0200517 <doCatch>
518 <exception>java.lang.Exception</exception>
519 <handled>
520 <constant>false</constant>
521 </handled>
522 <to
523 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
524 </doCatch>
525 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +0200526 </route>
527 </put>
sebdet919ef9d2019-04-08 18:32:26 +0200528 <put uri="/v2/loop/delete/{loopName}">
sebdetdfa86ca2019-04-05 15:15:31 +0200529 <route>
sebdet338c2182019-04-25 12:33:31 +0200530 <removeHeaders pattern="*" excludePattern="loopName"/>
xg353y9ac30702019-04-19 13:55:40 +0200531 <doTry>
sebdetcd64cc42019-04-10 14:07:35 +0200532 <log
533 loggingLevel="INFO"
xg353y9ac30702019-04-19 13:55:40 +0200534 message="Receive DELETE request for loop: ${header.loopName}" />
sebdet338c2182019-04-25 12:33:31 +0200535 <to
xg353y9ac30702019-04-19 13:55:40 +0200536 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Delete the closed loop')" />
537 <to
538 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
539 <to uri="direct:load-loop" />
540 <to
sebdet338c2182019-04-25 12:33:31 +0200541 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive DELETE request','INFO',${exchangeProperty[loopObject]})" />
sebdet667cb722019-04-11 02:07:44 +0200542
sebdet338c2182019-04-25 12:33:31 +0200543 <doTry>
xg353y9ac30702019-04-19 13:55:40 +0200544 <to uri="direct:remove-all-policy-from-active-pdp-group" />
545 <doCatch>
sebdet338c2182019-04-25 12:33:31 +0200546 <exception>java.lang.Exception</exception>
547 <handled>
548 <constant>false</constant>
549 </handled>
550 <to
551 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
552 </doCatch>
xg353y9ac30702019-04-19 13:55:40 +0200553 </doTry>
sebdetcd64cc42019-04-10 14:07:35 +0200554
sebdet338c2182019-04-25 12:33:31 +0200555
sebdetcd64cc42019-04-10 14:07:35 +0200556 <split>
sebdet338c2182019-04-25 12:33:31 +0200557 <simple>${exchangeProperty[loopObject].getMicroServicePolicies()}
sebdetcd64cc42019-04-10 14:07:35 +0200558 </simple>
sebdet338c2182019-04-25 12:33:31 +0200559 <setProperty propertyName="microServicePolicy">
sebdetcd64cc42019-04-10 14:07:35 +0200560 <simple>${body}</simple>
sebdet338c2182019-04-25 12:33:31 +0200561 </setProperty>
sebdetcd64cc42019-04-10 14:07:35 +0200562 <log
563 loggingLevel="INFO"
sebdet338c2182019-04-25 12:33:31 +0200564 message="Processing Micro Service Policy: ${exchangeProperty[microServicePolicy].getName()}" />
sebdetcd64cc42019-04-10 14:07:35 +0200565
sebdet338c2182019-04-25 12:33:31 +0200566 <doTry>
xg353y9ac30702019-04-19 13:55:40 +0200567 <to uri="direct:delete-micro-service-policy" />
568 <doCatch>
sebdet338c2182019-04-25 12:33:31 +0200569 <exception>java.lang.Exception</exception>
570 <handled>
571 <constant>false</constant>
572 </handled>
573 <to
574 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
575 </doCatch>
xg353y9ac30702019-04-19 13:55:40 +0200576 </doTry>
577
sebdetcd64cc42019-04-10 14:07:35 +0200578 </split>
xg353y9ac30702019-04-19 13:55:40 +0200579
580 <log
581 loggingLevel="INFO"
sebdet338c2182019-04-25 12:33:31 +0200582 message="Processing all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}" />
xg353y9ac30702019-04-19 13:55:40 +0200583 <split>
sebdet338c2182019-04-25 12:33:31 +0200584 <simple>${exchangeProperty[loopObject].getOperationalPolicies()}
xg353y9ac30702019-04-19 13:55:40 +0200585 </simple>
sebdet338c2182019-04-25 12:33:31 +0200586 <setProperty propertyName="operationalPolicy">
xg353y9ac30702019-04-19 13:55:40 +0200587 <simple>${body}</simple>
sebdet338c2182019-04-25 12:33:31 +0200588 </setProperty>
xg353y9ac30702019-04-19 13:55:40 +0200589 <log
590 loggingLevel="INFO"
sebdet338c2182019-04-25 12:33:31 +0200591 message="Processing Operational Policy: ${exchangeProperty[operationalPolicy].getName()}" />
592
593 <doTry>
xg353y9ac30702019-04-19 13:55:40 +0200594 <to uri="direct:delete-operational-policy" />
595 <doCatch>
sebdet338c2182019-04-25 12:33:31 +0200596 <exception>java.lang.Exception</exception>
597 <handled>
598 <constant>false</constant>
599 </handled>
600 <to
601 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
602 </doCatch>
xg353y9ac30702019-04-19 13:55:40 +0200603 </doTry>
604
605 <log
606 loggingLevel="INFO"
sebdet338c2182019-04-25 12:33:31 +0200607 message="Processing all GUARD policies defined in loop ${exchangeProperty[loopObject].getName()}" />
xg353y9ac30702019-04-19 13:55:40 +0200608 <split>
sebdet338c2182019-04-25 12:33:31 +0200609 <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()}
xg353y9ac30702019-04-19 13:55:40 +0200610 </simple>
sebdet338c2182019-04-25 12:33:31 +0200611 <setProperty propertyName="guardPolicy">
xg353y9ac30702019-04-19 13:55:40 +0200612 <simple>${body}</simple>
sebdet338c2182019-04-25 12:33:31 +0200613 </setProperty>
xg353y9ac30702019-04-19 13:55:40 +0200614 <log
615 loggingLevel="INFO"
sebdet338c2182019-04-25 12:33:31 +0200616 message="Processing Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" />
xg353y9ac30702019-04-19 13:55:40 +0200617
sebdet338c2182019-04-25 12:33:31 +0200618 <doTry>
xg353y9ac30702019-04-19 13:55:40 +0200619 <to uri="direct:delete-guard-policy" />
620 <doCatch>
sebdet338c2182019-04-25 12:33:31 +0200621 <exception>java.lang.Exception</exception>
622 <handled>
623 <constant>false</constant>
624 </handled>
625 <to
626 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
627 </doCatch>
xg353y9ac30702019-04-19 13:55:40 +0200628 </doTry>
629
630 </split>
631 </split>
632 <to
633 uri="bean:org.onap.clamp.loop.log.LoopService?method=deleteLoop(${header.loopName})" />
634 <log
635 loggingLevel="INFO"
636 message="DELETE request successfully executed for loop: ${body}" />
637 <to
sebdet338c2182019-04-25 12:33:31 +0200638 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request successfully executed','INFO',${exchangeProperty[loopObject]})" />
xg353y9ac30702019-04-19 13:55:40 +0200639 <to
640 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
sebdet338c2182019-04-25 12:33:31 +0200641 <doCatch>
642 <exception>java.lang.Exception</exception>
643 <handled>
644 <constant>false</constant>
645 </handled>
646 <to
647 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
648 </doCatch>
649 </doTry>
sebdetdfa86ca2019-04-05 15:15:31 +0200650 </route>
651 </put>
652 </rest>
Krysiak Adam5f14c7a2019-03-01 15:32:19 +0100653</rests>