sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 1 | <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> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 8 | <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> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 25 | </route> |
| 26 | </get> |
| 27 | <get |
| 28 | uri="/v2/loop/{loopName}" |
| 29 | outType="org.onap.clamp.loop.Loop" |
| 30 | produces="application/json"> |
| 31 | <route> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 32 | <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> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 49 | </route> |
| 50 | </get> |
| 51 | <get |
| 52 | uri="/v2/loop/svgRepresentation/{loopName}" |
| 53 | outType="java.lang.String" |
| 54 | produces="application/xml"> |
| 55 | <route> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 56 | <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> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 73 | </route> |
| 74 | </get> |
michal.banka | 89695a3 | 2019-03-12 13:01:26 +0100 | [diff] [blame] | 75 | |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 76 | <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> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 83 | <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> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 106 | </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> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 115 | <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> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 138 | </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> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 147 | <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> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 155 | |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 156 | <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> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 171 | </route> |
| 172 | </post> |
| 173 | <put |
| 174 | uri="/v2/loop/deployLoop/{loopName}" |
| 175 | outType="org.onap.clamp.loop.Loop" |
| 176 | produces="application/json"> |
| 177 | <route> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 178 | <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> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 195 | </route> |
| 196 | </put> |
| 197 | <put |
| 198 | uri="/v2/loop/undeployLoop/{loopName}" |
| 199 | outType="org.onap.clamp.loop.Loop" |
| 200 | produces="application/json"> |
| 201 | <route> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 202 | <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> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 219 | </route> |
| 220 | </put> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 221 | <put |
sebdet | 1efe60f | 2019-04-11 17:58:36 +0200 | [diff] [blame] | 222 | uri="/v2/loop/stop/{loopName}" |
| 223 | outType="org.onap.clamp.loop.Loop" |
| 224 | produces="application/json"> |
| 225 | <route> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 226 | <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> |
sebdet | 1efe60f | 2019-04-11 17:58:36 +0200 | [diff] [blame] | 265 | </route> |
sebdet | 1efe60f | 2019-04-11 17:58:36 +0200 | [diff] [blame] | 266 | </put> |
| 267 | <put |
| 268 | uri="/v2/loop/start/{loopName}" |
| 269 | outType="org.onap.clamp.loop.Loop" |
| 270 | produces="application/json"> |
| 271 | <route> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 272 | <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> |
sebdet | 1efe60f | 2019-04-11 17:58:36 +0200 | [diff] [blame] | 310 | </route> |
sebdet | 1efe60f | 2019-04-11 17:58:36 +0200 | [diff] [blame] | 311 | </put> |
| 312 | <put |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 313 | uri="/v2/loop/submit/{loopName}" |
| 314 | outType="org.onap.clamp.loop.Loop" |
| 315 | produces="application/json"> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 316 | <route> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 317 | <doTry> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 318 | <log |
| 319 | loggingLevel="INFO" |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 320 | 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})" /> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 328 | <setHeader headerName="RaiseHttpExceptionFlag"> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 329 | <simple resultType="java.lang.Boolean">false</simple> |
| 330 | </setHeader> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 331 | |
| 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> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 342 | |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 343 | <log |
| 344 | loggingLevel="INFO" |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 345 | message="Processing all MICRO-SERVICES policies defined in loop ${header.LoopObject.getName()}" /> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 346 | <split> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 347 | <simple>${header.LoopObject.getMicroServicePolicies()} |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 348 | </simple> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 349 | <setHeader headerName="microServicePolicy"> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 350 | <simple>${body}</simple> |
| 351 | </setHeader> |
| 352 | <log |
| 353 | loggingLevel="INFO" |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 354 | message="Processing Micro Service Policy: ${header.microServicePolicy.getName()}" /> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 355 | <setHeader headerName="RaiseHttpExceptionFlag"> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 356 | <simple resultType="java.lang.Boolean">false</simple> |
| 357 | </setHeader> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 358 | |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 359 | <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 | |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 381 | </split> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 382 | <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> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 397 | |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 398 | <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> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 494 | </route> |
| 495 | </put> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 496 | <put uri="/v2/loop/delete/{loopName}"> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 497 | <route> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 498 | <doTry> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 499 | <log |
| 500 | loggingLevel="INFO" |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 501 | 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})" /> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 509 | |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 510 | <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> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 520 | |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 521 | |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 522 | <split> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 523 | <simple>${header.LoopObject.getMicroServicePolicies()} |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 524 | </simple> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 525 | <setHeader headerName="microServicePolicy"> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 526 | <simple>${body}</simple> |
| 527 | </setHeader> |
| 528 | <log |
| 529 | loggingLevel="INFO" |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 530 | message="Processing Micro Service Policy: ${header.microServicePolicy.getName()}" /> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 531 | |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 532 | <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 | |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 543 | </split> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 544 | |
| 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> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 612 | </route> |
| 613 | </put> |
| 614 | </rest> |
Krysiak Adam | 5f14c7a | 2019-03-01 15:32:19 +0100 | [diff] [blame] | 615 | </rests> |