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> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 8 | <removeHeaders pattern="*" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 9 | <doTry> |
| 10 | <to |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 11 | 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()" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 18 | <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> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 27 | </route> |
| 28 | </get> |
| 29 | <get |
| 30 | uri="/v2/loop/{loopName}" |
| 31 | outType="org.onap.clamp.loop.Loop" |
| 32 | produces="application/json"> |
| 33 | <route> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 34 | <removeHeaders |
| 35 | pattern="*" |
| 36 | excludePattern="loopName" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 37 | <doTry> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 38 | <to |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 39 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get Closed Loop')" /> |
| 40 | <to |
| 41 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" /> |
| 42 | <to |
| 43 | uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" /> |
| 44 | <to |
| 45 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 46 | <doCatch> |
| 47 | <exception>java.lang.Exception</exception> |
| 48 | <handled> |
| 49 | <constant>false</constant> |
| 50 | </handled> |
| 51 | <to |
| 52 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> |
| 53 | </doCatch> |
| 54 | </doTry> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 55 | </route> |
| 56 | </get> |
| 57 | <get |
| 58 | uri="/v2/loop/svgRepresentation/{loopName}" |
| 59 | outType="java.lang.String" |
| 60 | produces="application/xml"> |
| 61 | <route> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 62 | <removeHeaders |
| 63 | pattern="*" |
| 64 | excludePattern="loopName" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 65 | <doTry> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 66 | <to |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 67 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get SVG Representation')" /> |
| 68 | <to |
| 69 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" /> |
| 70 | <to |
| 71 | uri="bean:org.onap.clamp.loop.LoopController?method=getSVGRepresentation(${header.loopName})" /> |
| 72 | <to |
| 73 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 74 | <doCatch> |
| 75 | <exception>java.lang.Exception</exception> |
| 76 | <handled> |
| 77 | <constant>false</constant> |
| 78 | </handled> |
| 79 | <to |
| 80 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> |
| 81 | </doCatch> |
| 82 | </doTry> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 83 | </route> |
| 84 | </get> |
michal.banka | 89695a3 | 2019-03-12 13:01:26 +0100 | [diff] [blame] | 85 | |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 86 | <post |
| 87 | uri="/v2/loop/updateGlobalProperties/{loopName}" |
| 88 | type="com.google.gson.JsonObject" |
| 89 | consumes="application/json" |
| 90 | outType="org.onap.clamp.loop.Loop" |
| 91 | produces="application/json"> |
| 92 | <route> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 93 | <removeHeaders |
| 94 | pattern="*" |
| 95 | excludePattern="loopName" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 96 | <doTry> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 97 | <to |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 98 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update the global properties')" /> |
| 99 | <to |
| 100 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 101 | <setHeader headerName="GlobalPropertiesJson"> |
| 102 | <simple>${body}</simple> |
| 103 | </setHeader> |
| 104 | <to uri="direct:load-loop" /> |
| 105 | <to |
| 106 | uri="bean:org.onap.clamp.loop.LoopController?method=updateGlobalPropertiesJson(${header.loopName},${header.GlobalPropertiesJson})" /> |
| 107 | <to |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 108 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Global Properties UPDATED','INFO',${exchangeProperty[loopObject]})" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 109 | <to |
| 110 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 111 | <doCatch> |
| 112 | <exception>java.lang.Exception</exception> |
| 113 | <handled> |
| 114 | <constant>false</constant> |
| 115 | </handled> |
| 116 | <to |
| 117 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> |
| 118 | </doCatch> |
| 119 | </doTry> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 120 | </route> |
| 121 | </post> |
| 122 | <post |
| 123 | uri="/v2/loop/updateOperationalPolicies/{loopName}" |
| 124 | type="com.google.gson.JsonArray" |
| 125 | consumes="application/json" |
| 126 | outType="org.onap.clamp.loop.Loop" |
| 127 | produces="application/json"> |
| 128 | <route> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 129 | <removeHeaders |
| 130 | pattern="*" |
| 131 | excludePattern="loopName" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 132 | <doTry> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 133 | <to |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 134 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update operational policies')" /> |
| 135 | <to |
| 136 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 137 | <setHeader headerName="OperationalPoliciesArray"> |
| 138 | <simple>${body}</simple> |
| 139 | </setHeader> |
| 140 | <to uri="direct:load-loop" /> |
| 141 | <to |
| 142 | uri="bean:org.onap.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${header.OperationalPoliciesArray})" /> |
| 143 | <to |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 144 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Operational and Guard policies UPDATED','INFO',${exchangeProperty[loopObject]})" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 145 | <to |
| 146 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 147 | <doCatch> |
| 148 | <exception>java.lang.Exception</exception> |
| 149 | <handled> |
| 150 | <constant>false</constant> |
| 151 | </handled> |
| 152 | <to |
| 153 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> |
| 154 | </doCatch> |
| 155 | </doTry> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 156 | </route> |
| 157 | </post> |
| 158 | <post |
| 159 | uri="/v2/loop/updateMicroservicePolicy/{loopName}" |
| 160 | type="org.onap.clamp.policy.microservice.MicroServicePolicy" |
| 161 | consumes="application/json" |
| 162 | outType="org.onap.clamp.policy.microservice.MicroServicePolicy" |
| 163 | produces="application/json"> |
| 164 | <route> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 165 | <removeHeaders |
| 166 | pattern="*" |
| 167 | excludePattern="loopName" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 168 | <doTry> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 169 | <to |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 170 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update Microservice policies')" /> |
| 171 | <to |
| 172 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 173 | <setProperty propertyName="MicroServicePolicyObject"> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 174 | <simple>${body}</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 175 | </setProperty> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 176 | |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 177 | <to uri="direct:load-loop" /> |
| 178 | <to |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 179 | uri="bean:org.onap.clamp.loop.LoopController?method=updateMicroservicePolicy(${header.loopName},${exchangeProperty[MicroServicePolicyObject]})" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 180 | <to |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 181 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Micro Service policies UPDATED','INFO',${exchangeProperty[loopObject]})" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 182 | <to |
| 183 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 184 | <doCatch> |
| 185 | <exception>java.lang.Exception</exception> |
| 186 | <handled> |
| 187 | <constant>false</constant> |
| 188 | </handled> |
| 189 | <to |
| 190 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> |
| 191 | </doCatch> |
| 192 | </doTry> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 193 | </route> |
| 194 | </post> |
| 195 | <put |
| 196 | uri="/v2/loop/deployLoop/{loopName}" |
| 197 | outType="org.onap.clamp.loop.Loop" |
| 198 | produces="application/json"> |
| 199 | <route> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 200 | <removeHeaders |
| 201 | pattern="*" |
| 202 | excludePattern="loopName" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 203 | <doTry> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 204 | <to |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 205 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Deploy the closed loop')" /> |
| 206 | <to |
| 207 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 208 | <to |
| 209 | uri="bean:org.onap.clamp.operation.LoopOperation?method=deployLoop(*,${header.loopName})" /> |
| 210 | <to |
| 211 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 212 | <doCatch> |
| 213 | <exception>java.lang.Exception</exception> |
| 214 | <handled> |
| 215 | <constant>false</constant> |
| 216 | </handled> |
| 217 | <to |
| 218 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> |
| 219 | </doCatch> |
| 220 | </doTry> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 221 | </route> |
| 222 | </put> |
| 223 | <put |
| 224 | uri="/v2/loop/undeployLoop/{loopName}" |
| 225 | outType="org.onap.clamp.loop.Loop" |
| 226 | produces="application/json"> |
| 227 | <route> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 228 | <removeHeaders |
| 229 | pattern="*" |
| 230 | excludePattern="loopName" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 231 | <doTry> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 232 | <to |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 233 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Undeploy the closed loop')" /> |
| 234 | <to |
| 235 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 236 | <to |
| 237 | uri="bean:org.onap.clamp.operation.LoopOperation?method=unDeployLoop(${header.loopName})" /> |
| 238 | <to |
| 239 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 240 | <doCatch> |
| 241 | <exception>java.lang.Exception</exception> |
| 242 | <handled> |
| 243 | <constant>false</constant> |
| 244 | </handled> |
| 245 | <to |
| 246 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> |
| 247 | </doCatch> |
| 248 | </doTry> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 249 | </route> |
| 250 | </put> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 251 | <put |
sebdet | 1efe60f | 2019-04-11 17:58:36 +0200 | [diff] [blame] | 252 | uri="/v2/loop/stop/{loopName}" |
| 253 | outType="org.onap.clamp.loop.Loop" |
| 254 | produces="application/json"> |
| 255 | <route> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 256 | <removeHeaders |
| 257 | pattern="*" |
| 258 | excludePattern="loopName" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 259 | <doTry> |
| 260 | <log |
| 261 | loggingLevel="INFO" |
| 262 | message="Receive STOP request for loop: ${header.loopName}" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 263 | <to |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 264 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Stop the closed loop')" /> |
| 265 | <to |
| 266 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 267 | <to uri="direct:load-loop" /> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 268 | <to uri="direct:remove-all-policy-from-active-pdp-group" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 269 | <log |
| 270 | loggingLevel="INFO" |
| 271 | message="STOP request successfully executed for loop: ${body}" /> |
| 272 | <to |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 273 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request successfully executed','INFO',${exchangeProperty[loopObject]})" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 274 | <to |
| 275 | uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" /> |
| 276 | <to |
| 277 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 278 | <doCatch> |
| 279 | <exception>java.lang.Exception</exception> |
| 280 | <handled> |
| 281 | <constant>false</constant> |
| 282 | </handled> |
| 283 | <to |
| 284 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 285 | <log |
| 286 | loggingLevel="ERROR" |
| 287 | message="STOP request failed for loop: $${header.loopName}" /> |
| 288 | <to |
| 289 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request failed','ERROR',${exchangeProperty[loopObject]})" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 290 | </doCatch> |
| 291 | </doTry> |
sebdet | 1efe60f | 2019-04-11 17:58:36 +0200 | [diff] [blame] | 292 | </route> |
sebdet | 1efe60f | 2019-04-11 17:58:36 +0200 | [diff] [blame] | 293 | </put> |
| 294 | <put |
| 295 | uri="/v2/loop/start/{loopName}" |
| 296 | outType="org.onap.clamp.loop.Loop" |
| 297 | produces="application/json"> |
| 298 | <route> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 299 | <removeHeaders |
| 300 | pattern="*" |
| 301 | excludePattern="loopName" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 302 | <doTry> |
| 303 | <log |
| 304 | loggingLevel="INFO" |
| 305 | message="Receive START request for loop: ${header.loopName}" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 306 | <to |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 307 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Start the closed loop')" /> |
| 308 | <to |
| 309 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 310 | <to uri="direct:load-loop" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 311 | |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 312 | |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 313 | <to uri="direct:add-all-to-active-pdp-group" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 314 | <log |
| 315 | loggingLevel="INFO" |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 316 | message="START request successfully executed for loop: ${header.loopName}" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 317 | <to |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 318 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('START request successfully executed','INFO',${exchangeProperty[loopObject]})" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 319 | <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()" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 323 | <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()" /> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 330 | <log |
| 331 | loggingLevel="ERROR" |
| 332 | message="START request failed for loop: ${header.loopName}" /> |
| 333 | <to |
| 334 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('START request failed','INFO',${exchangeProperty[loopObject]})" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 335 | </doCatch> |
| 336 | </doTry> |
sebdet | 1efe60f | 2019-04-11 17:58:36 +0200 | [diff] [blame] | 337 | </route> |
sebdet | 1efe60f | 2019-04-11 17:58:36 +0200 | [diff] [blame] | 338 | </put> |
| 339 | <put |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 340 | uri="/v2/loop/submit/{loopName}" |
| 341 | outType="org.onap.clamp.loop.Loop" |
| 342 | produces="application/json"> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 343 | <route> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 344 | <removeHeaders |
| 345 | pattern="*" |
| 346 | excludePattern="loopName" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 347 | <doTry> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 348 | <log |
| 349 | loggingLevel="INFO" |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 350 | message="Receive SUBMIT request for loop: ${header.loopName}" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 351 | <to |
| 352 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Submit the closed loop')" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 353 | <to |
| 354 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 355 | <to uri="direct:load-loop" /> |
| 356 | <to |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 357 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive SUBMIT request','INFO',${exchangeProperty[loopObject]})" /> |
| 358 | <setProperty propertyName="raiseHttpExceptionFlag"> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 359 | <simple resultType="java.lang.Boolean">false</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 360 | </setProperty> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 361 | <to uri="direct:remove-all-policy-from-active-pdp-group" /> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 362 | <log |
| 363 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 364 | message="Processing all MICRO-SERVICES policies defined in loop ${exchangeProperty[loopObject].getName()}" /> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 365 | <split> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 366 | <simple>${exchangeProperty[loopObject].getMicroServicePolicies()} |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 367 | </simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 368 | <setProperty propertyName="microServicePolicy"> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 369 | <simple>${body}</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 370 | </setProperty> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 371 | <log |
| 372 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 373 | message="Processing Micro Service Policy: ${exchangeProperty[microServicePolicy].getName()}" /> |
| 374 | <setProperty propertyName="raiseHttpExceptionFlag"> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 375 | <simple resultType="java.lang.Boolean">false</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 376 | </setProperty> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 377 | <to uri="direct:delete-micro-service-policy" /> |
| 378 | <to uri="direct:create-micro-service-policy" /> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 379 | </split> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 380 | <log |
| 381 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 382 | message="Processing all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 383 | <split> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 384 | <simple>${exchangeProperty[loopObject].getOperationalPolicies()} |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 385 | </simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 386 | <setProperty propertyName="operationalPolicy"> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 387 | <simple>${body}</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 388 | </setProperty> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 389 | <log |
| 390 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 391 | message="Processing Operational Policy: ${exchangeProperty[operationalPolicy].getName()}" /> |
| 392 | <setProperty propertyName="raiseHttpExceptionFlag"> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 393 | <simple resultType="java.lang.Boolean">false</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 394 | </setProperty> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 395 | |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 396 | <to uri="direct:delete-operational-policy" /> |
| 397 | <to uri="direct:create-operational-policy" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 398 | |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 399 | <log |
| 400 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 401 | message="Processing all GUARD policies defined in loop ${exchangeProperty[loopObject].getName()}" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 402 | <split> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 403 | <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()} |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 404 | </simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 405 | <setProperty propertyName="guardPolicy"> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 406 | <simple>${body}</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 407 | </setProperty> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 408 | <log |
| 409 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 410 | message="Processing Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 411 | |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 412 | <setProperty propertyName="raiseHttpExceptionFlag"> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 413 | <simple resultType="java.lang.Boolean">false</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 414 | </setProperty> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 415 | <to uri="direct:delete-guard-policy" /> |
| 416 | <to uri="direct:create-guard-policy" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 417 | </split> |
| 418 | </split> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 419 | |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 420 | <to uri="direct:add-all-to-active-pdp-group" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 421 | |
| 422 | <log |
| 423 | loggingLevel="INFO" |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 424 | message="SUBMIT request successfully executed for loop: ${header.loopName}" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 425 | <to |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 426 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request successfully executed','INFO',${exchangeProperty[loopObject]})" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 427 | <to |
| 428 | uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" /> |
| 429 | <to |
| 430 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 431 | <doCatch> |
| 432 | <exception>java.lang.Exception</exception> |
| 433 | <handled> |
| 434 | <constant>false</constant> |
| 435 | </handled> |
| 436 | <to |
| 437 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 438 | <log |
| 439 | loggingLevel="ERROR" |
| 440 | message="SUBMIT request failed for loop: ${header.loopName}" /> |
| 441 | <to |
| 442 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request failed','ERROR',${exchangeProperty[loopObject]})" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 443 | </doCatch> |
| 444 | </doTry> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 445 | </route> |
| 446 | </put> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 447 | <put uri="/v2/loop/delete/{loopName}"> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 448 | <route> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 449 | <removeHeaders |
| 450 | pattern="*" |
| 451 | excludePattern="loopName" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 452 | <doTry> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 453 | <log |
| 454 | loggingLevel="INFO" |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 455 | message="Receive DELETE request for loop: ${header.loopName}" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 456 | <to |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 457 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Delete the closed loop')" /> |
| 458 | <to |
| 459 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 460 | <to uri="direct:load-loop" /> |
| 461 | <to |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 462 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive DELETE request','INFO',${exchangeProperty[loopObject]})" /> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 463 | <to uri="direct:remove-all-policy-from-active-pdp-group" /> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 464 | <split> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 465 | <simple>${exchangeProperty[loopObject].getMicroServicePolicies()} |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 466 | </simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 467 | <setProperty propertyName="microServicePolicy"> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 468 | <simple>${body}</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 469 | </setProperty> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 470 | <log |
| 471 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 472 | message="Processing Micro Service Policy: ${exchangeProperty[microServicePolicy].getName()}" /> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 473 | <to uri="direct:delete-micro-service-policy" /> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 474 | </split> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 475 | |
| 476 | <log |
| 477 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 478 | message="Processing all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 479 | <split> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 480 | <simple>${exchangeProperty[loopObject].getOperationalPolicies()} |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 481 | </simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 482 | <setProperty propertyName="operationalPolicy"> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 483 | <simple>${body}</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 484 | </setProperty> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 485 | <log |
| 486 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 487 | message="Processing Operational Policy: ${exchangeProperty[operationalPolicy].getName()}" /> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 488 | <to uri="direct:delete-operational-policy" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 489 | <log |
| 490 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 491 | message="Processing all GUARD policies defined in loop ${exchangeProperty[loopObject].getName()}" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 492 | <split> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 493 | <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()} |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 494 | </simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 495 | <setProperty propertyName="guardPolicy"> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 496 | <simple>${body}</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 497 | </setProperty> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 498 | <log |
| 499 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 500 | message="Processing Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" /> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 501 | <to uri="direct:delete-guard-policy" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 502 | </split> |
| 503 | </split> |
| 504 | <to |
| 505 | uri="bean:org.onap.clamp.loop.log.LoopService?method=deleteLoop(${header.loopName})" /> |
| 506 | <log |
| 507 | loggingLevel="INFO" |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 508 | message="DELETE request successfully executed for loop: ${header.loopName}" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 509 | <to |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 510 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request successfully executed','INFO',${exchangeProperty[loopObject]})" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 511 | <to |
| 512 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 513 | <doCatch> |
| 514 | <exception>java.lang.Exception</exception> |
| 515 | <handled> |
| 516 | <constant>false</constant> |
| 517 | </handled> |
| 518 | <to |
| 519 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 520 | <log |
| 521 | loggingLevel="ERROR" |
| 522 | message="DELETE request failed for loop: ${header.loopName}" /> |
| 523 | <to |
| 524 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request failed','ERROR',${exchangeProperty[loopObject]})" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 525 | </doCatch> |
| 526 | </doTry> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 527 | </route> |
| 528 | </put> |
| 529 | </rest> |
Krysiak Adam | 5f14c7a | 2019-03-01 15:32:19 +0100 | [diff] [blame] | 530 | </rests> |