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 |
sebdet | b328b37 | 2019-05-08 15:36:55 +0200 | [diff] [blame^] | 205 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'DEPLOY the closed loop')" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 206 | <to |
| 207 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
sebdet | b328b37 | 2019-05-08 15:36:55 +0200 | [diff] [blame^] | 208 | <to uri="direct:load-loop" /> |
| 209 | <to uri="direct:get-status-from-policy" /> |
| 210 | <to uri="direct:get-status-from-dcae" /> |
xg353y | 7e8938e | 2019-05-03 13:23:40 +0200 | [diff] [blame] | 211 | <log |
| 212 | loggingLevel="INFO" |
sebdet | b328b37 | 2019-05-08 15:36:55 +0200 | [diff] [blame^] | 213 | message="Policy deployment status: ${exchangeProperty[policyStatus]}"></log> |
xg353y | 39d82de | 2019-04-26 13:26:25 +0200 | [diff] [blame] | 214 | <choice> |
xg353y | 39d82de | 2019-04-26 13:26:25 +0200 | [diff] [blame] | 215 | <when> |
| 216 | <simple> ${exchangeProperty[policyStatus]} == 'SUBMITTED' and |
| 217 | ${exchangeProperty[dcaeStatus]} == 'NOT_DEPLOYED' |
| 218 | </simple> |
sebdet | b328b37 | 2019-05-08 15:36:55 +0200 | [diff] [blame^] | 219 | <to uri="direct:deploy-closedloop" /> |
xg353y | 39d82de | 2019-04-26 13:26:25 +0200 | [diff] [blame] | 220 | </when> |
| 221 | <otherwise> |
| 222 | <log |
| 223 | loggingLevel="INFO" |
| 224 | message="Closed Loop is in state ${exchangeProperty[policyStatus]}, it can only be deployed when in state SUBMIT" /> |
| 225 | <to |
| 226 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Closed Loop is in state ${exchangeProperty[policyStatus]}, it can only be deployed when in state SUBMIT','ERROR',${exchangeProperty[loopObject]})" /> |
| 227 | </otherwise> |
| 228 | </choice> |
sebdet | b328b37 | 2019-05-08 15:36:55 +0200 | [diff] [blame^] | 229 | <log |
| 230 | loggingLevel="INFO" |
| 231 | message="DEPLOY request successfully executed for loop: ${header.loopName}" /> |
| 232 | <to |
| 233 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request successfully executed','INFO',${exchangeProperty[loopObject]})" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 234 | <to |
| 235 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 236 | <doCatch> |
| 237 | <exception>java.lang.Exception</exception> |
| 238 | <handled> |
| 239 | <constant>false</constant> |
| 240 | </handled> |
| 241 | <to |
| 242 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> |
xg353y | 39d82de | 2019-04-26 13:26:25 +0200 | [diff] [blame] | 243 | <log |
| 244 | loggingLevel="ERROR" |
sebdet | b328b37 | 2019-05-08 15:36:55 +0200 | [diff] [blame^] | 245 | message="DEPLOY request failed for loop: ${header.loopName}" /> |
xg353y | 39d82de | 2019-04-26 13:26:25 +0200 | [diff] [blame] | 246 | <to |
sebdet | b328b37 | 2019-05-08 15:36:55 +0200 | [diff] [blame^] | 247 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request failed, Error reported: ${exception}','ERROR',${exchangeProperty[loopObject]})" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 248 | </doCatch> |
| 249 | </doTry> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 250 | </route> |
| 251 | </put> |
| 252 | <put |
| 253 | uri="/v2/loop/undeployLoop/{loopName}" |
| 254 | outType="org.onap.clamp.loop.Loop" |
| 255 | produces="application/json"> |
| 256 | <route> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 257 | <removeHeaders |
| 258 | pattern="*" |
| 259 | excludePattern="loopName" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 260 | <doTry> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 261 | <to |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 262 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Undeploy the closed loop')" /> |
| 263 | <to |
| 264 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
sebdet | b328b37 | 2019-05-08 15:36:55 +0200 | [diff] [blame^] | 265 | <to uri="direct:load-loop" /> |
| 266 | <to uri="direct:get-status-from-dcae" /> |
xg353y | 39d82de | 2019-04-26 13:26:25 +0200 | [diff] [blame] | 267 | <choice> |
| 268 | <when> |
| 269 | <simple> ${exchangeProperty[dcaeStatus]} == 'DEPLOYED' |
| 270 | </simple> |
sebdet | b328b37 | 2019-05-08 15:36:55 +0200 | [diff] [blame^] | 271 | <to uri="direct:undeploy-closedloop" /> |
xg353y | 39d82de | 2019-04-26 13:26:25 +0200 | [diff] [blame] | 272 | </when> |
| 273 | <otherwise> |
| 274 | <log |
| 275 | loggingLevel="INFO" |
| 276 | message="Closed Loop is in state ${exchangeProperty[dcaeStatus]}, it can only be undeployed when in state DEPLOYED" /> |
| 277 | <to |
| 278 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Closed Loop is in state ${exchangeProperty[dcaeStatus]}, it can only be deployed when in state DEPLOYED','ERROR',${exchangeProperty[loopObject]})" /> |
| 279 | </otherwise> |
| 280 | </choice> |
sebdet | b328b37 | 2019-05-08 15:36:55 +0200 | [diff] [blame^] | 281 | <log |
| 282 | loggingLevel="INFO" |
| 283 | message="UNDEPLOY request successfully executed for loop: ${header.loopName}" /> |
| 284 | <to |
| 285 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request successfully executed','INFO',${exchangeProperty[loopObject]})" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 286 | <to |
| 287 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 288 | <doCatch> |
| 289 | <exception>java.lang.Exception</exception> |
| 290 | <handled> |
| 291 | <constant>false</constant> |
| 292 | </handled> |
| 293 | <to |
| 294 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> |
xg353y | 39d82de | 2019-04-26 13:26:25 +0200 | [diff] [blame] | 295 | <log |
| 296 | loggingLevel="ERROR" |
sebdet | b328b37 | 2019-05-08 15:36:55 +0200 | [diff] [blame^] | 297 | message="UNDEPLOY request failed for loop: ${header.loopName}" /> |
xg353y | 39d82de | 2019-04-26 13:26:25 +0200 | [diff] [blame] | 298 | <to |
sebdet | b328b37 | 2019-05-08 15:36:55 +0200 | [diff] [blame^] | 299 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request failed, Error reported: ${exception}','ERROR',${exchangeProperty[loopObject]})" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 300 | </doCatch> |
| 301 | </doTry> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 302 | </route> |
| 303 | </put> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 304 | <put |
sebdet | 1efe60f | 2019-04-11 17:58:36 +0200 | [diff] [blame] | 305 | uri="/v2/loop/stop/{loopName}" |
| 306 | outType="org.onap.clamp.loop.Loop" |
| 307 | produces="application/json"> |
| 308 | <route> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 309 | <removeHeaders |
| 310 | pattern="*" |
| 311 | excludePattern="loopName" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 312 | <doTry> |
| 313 | <log |
| 314 | loggingLevel="INFO" |
| 315 | message="Receive STOP request for loop: ${header.loopName}" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 316 | <to |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 317 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Stop the closed loop')" /> |
| 318 | <to |
| 319 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 320 | <to uri="direct:load-loop" /> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 321 | <to uri="direct:remove-all-policy-from-active-pdp-group" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 322 | <log |
| 323 | loggingLevel="INFO" |
sebdet | b328b37 | 2019-05-08 15:36:55 +0200 | [diff] [blame^] | 324 | message="STOP request successfully executed for loop: ${header.loopName}" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 325 | <to |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 326 | 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] | 327 | <to |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 328 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 329 | <doCatch> |
| 330 | <exception>java.lang.Exception</exception> |
| 331 | <handled> |
| 332 | <constant>false</constant> |
| 333 | </handled> |
| 334 | <to |
| 335 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 336 | <log |
| 337 | loggingLevel="ERROR" |
| 338 | message="STOP request failed for loop: $${header.loopName}" /> |
| 339 | <to |
sebdet | 584cc4a | 2019-05-03 14:32:53 +0200 | [diff] [blame] | 340 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request failed, Error reported: ${exception}','ERROR',${exchangeProperty[loopObject]})" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 341 | </doCatch> |
| 342 | </doTry> |
sebdet | 1efe60f | 2019-04-11 17:58:36 +0200 | [diff] [blame] | 343 | </route> |
sebdet | 1efe60f | 2019-04-11 17:58:36 +0200 | [diff] [blame] | 344 | </put> |
| 345 | <put |
| 346 | uri="/v2/loop/start/{loopName}" |
| 347 | outType="org.onap.clamp.loop.Loop" |
| 348 | produces="application/json"> |
| 349 | <route> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 350 | <removeHeaders |
| 351 | pattern="*" |
| 352 | excludePattern="loopName" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 353 | <doTry> |
| 354 | <log |
| 355 | loggingLevel="INFO" |
| 356 | message="Receive START request for loop: ${header.loopName}" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 357 | <to |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 358 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Start the closed loop')" /> |
| 359 | <to |
| 360 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 361 | <to uri="direct:load-loop" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 362 | |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 363 | |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 364 | <to uri="direct:add-all-to-active-pdp-group" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 365 | <log |
| 366 | loggingLevel="INFO" |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 367 | message="START request successfully executed for loop: ${header.loopName}" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 368 | <to |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 369 | 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] | 370 | <to |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 371 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 372 | <doCatch> |
| 373 | <exception>java.lang.Exception</exception> |
| 374 | <handled> |
| 375 | <constant>false</constant> |
| 376 | </handled> |
| 377 | <to |
| 378 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 379 | <log |
| 380 | loggingLevel="ERROR" |
| 381 | message="START request failed for loop: ${header.loopName}" /> |
| 382 | <to |
sebdet | 584cc4a | 2019-05-03 14:32:53 +0200 | [diff] [blame] | 383 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('START request failed, Error reported: ${exception}','INFO',${exchangeProperty[loopObject]})" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 384 | </doCatch> |
| 385 | </doTry> |
sebdet | 1efe60f | 2019-04-11 17:58:36 +0200 | [diff] [blame] | 386 | </route> |
sebdet | 1efe60f | 2019-04-11 17:58:36 +0200 | [diff] [blame] | 387 | </put> |
| 388 | <put |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 389 | uri="/v2/loop/submit/{loopName}" |
| 390 | outType="org.onap.clamp.loop.Loop" |
| 391 | produces="application/json"> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 392 | <route> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 393 | <removeHeaders |
| 394 | pattern="*" |
| 395 | excludePattern="loopName" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 396 | <doTry> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 397 | <log |
| 398 | loggingLevel="INFO" |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 399 | message="Receive SUBMIT request for loop: ${header.loopName}" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 400 | <to |
| 401 | 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] | 402 | <to |
| 403 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 404 | <to uri="direct:load-loop" /> |
| 405 | <to |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 406 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive SUBMIT request','INFO',${exchangeProperty[loopObject]})" /> |
| 407 | <setProperty propertyName="raiseHttpExceptionFlag"> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 408 | <simple resultType="java.lang.Boolean">false</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 409 | </setProperty> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 410 | <to uri="direct:remove-all-policy-from-active-pdp-group" /> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 411 | <log |
| 412 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 413 | message="Processing all MICRO-SERVICES policies defined in loop ${exchangeProperty[loopObject].getName()}" /> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 414 | <split> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 415 | <simple>${exchangeProperty[loopObject].getMicroServicePolicies()} |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 416 | </simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 417 | <setProperty propertyName="microServicePolicy"> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 418 | <simple>${body}</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 419 | </setProperty> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 420 | <log |
| 421 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 422 | message="Processing Micro Service Policy: ${exchangeProperty[microServicePolicy].getName()}" /> |
| 423 | <setProperty propertyName="raiseHttpExceptionFlag"> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 424 | <simple resultType="java.lang.Boolean">false</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 425 | </setProperty> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 426 | <to uri="direct:delete-micro-service-policy" /> |
| 427 | <to uri="direct:create-micro-service-policy" /> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 428 | </split> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 429 | <log |
| 430 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 431 | message="Processing all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 432 | <split> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 433 | <simple>${exchangeProperty[loopObject].getOperationalPolicies()} |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 434 | </simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 435 | <setProperty propertyName="operationalPolicy"> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 436 | <simple>${body}</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 437 | </setProperty> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 438 | <log |
| 439 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 440 | message="Processing Operational Policy: ${exchangeProperty[operationalPolicy].getName()}" /> |
| 441 | <setProperty propertyName="raiseHttpExceptionFlag"> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 442 | <simple resultType="java.lang.Boolean">false</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 443 | </setProperty> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 444 | |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 445 | <to uri="direct:delete-operational-policy" /> |
| 446 | <to uri="direct:create-operational-policy" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 447 | |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 448 | <log |
| 449 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 450 | message="Processing all GUARD policies defined in loop ${exchangeProperty[loopObject].getName()}" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 451 | <split> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 452 | <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()} |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 453 | </simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 454 | <setProperty propertyName="guardPolicy"> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 455 | <simple>${body}</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 456 | </setProperty> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 457 | <log |
| 458 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 459 | message="Processing Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 460 | |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 461 | <setProperty propertyName="raiseHttpExceptionFlag"> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 462 | <simple resultType="java.lang.Boolean">false</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 463 | </setProperty> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 464 | <to uri="direct:delete-guard-policy" /> |
| 465 | <to uri="direct:create-guard-policy" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 466 | </split> |
| 467 | </split> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 468 | |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 469 | <to uri="direct:add-all-to-active-pdp-group" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 470 | |
| 471 | <log |
| 472 | loggingLevel="INFO" |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 473 | message="SUBMIT request successfully executed for loop: ${header.loopName}" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 474 | <to |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 475 | 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] | 476 | <to |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 477 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 478 | <doCatch> |
| 479 | <exception>java.lang.Exception</exception> |
| 480 | <handled> |
| 481 | <constant>false</constant> |
| 482 | </handled> |
| 483 | <to |
| 484 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 485 | <log |
| 486 | loggingLevel="ERROR" |
| 487 | message="SUBMIT request failed for loop: ${header.loopName}" /> |
| 488 | <to |
sebdet | 584cc4a | 2019-05-03 14:32:53 +0200 | [diff] [blame] | 489 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request failed, Error reported: ${exception}','ERROR',${exchangeProperty[loopObject]})" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 490 | </doCatch> |
| 491 | </doTry> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 492 | </route> |
| 493 | </put> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 494 | <put uri="/v2/loop/delete/{loopName}"> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 495 | <route> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 496 | <removeHeaders |
| 497 | pattern="*" |
| 498 | excludePattern="loopName" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 499 | <doTry> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 500 | <log |
| 501 | loggingLevel="INFO" |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 502 | message="Receive DELETE request for loop: ${header.loopName}" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 503 | <to |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 504 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Delete the closed loop')" /> |
| 505 | <to |
| 506 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 507 | <to uri="direct:load-loop" /> |
| 508 | <to |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 509 | 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] | 510 | <to uri="direct:remove-all-policy-from-active-pdp-group" /> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 511 | <split> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 512 | <simple>${exchangeProperty[loopObject].getMicroServicePolicies()} |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 513 | </simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 514 | <setProperty propertyName="microServicePolicy"> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 515 | <simple>${body}</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 516 | </setProperty> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 517 | <log |
| 518 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 519 | message="Processing Micro Service Policy: ${exchangeProperty[microServicePolicy].getName()}" /> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 520 | <to uri="direct:delete-micro-service-policy" /> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 521 | </split> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 522 | |
| 523 | <log |
| 524 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 525 | message="Processing all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 526 | <split> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 527 | <simple>${exchangeProperty[loopObject].getOperationalPolicies()} |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 528 | </simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 529 | <setProperty propertyName="operationalPolicy"> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 530 | <simple>${body}</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 531 | </setProperty> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 532 | <log |
| 533 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 534 | message="Processing Operational Policy: ${exchangeProperty[operationalPolicy].getName()}" /> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 535 | <to uri="direct:delete-operational-policy" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 536 | <log |
| 537 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 538 | message="Processing all GUARD policies defined in loop ${exchangeProperty[loopObject].getName()}" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 539 | <split> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 540 | <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()} |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 541 | </simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 542 | <setProperty propertyName="guardPolicy"> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 543 | <simple>${body}</simple> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 544 | </setProperty> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 545 | <log |
| 546 | loggingLevel="INFO" |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 547 | message="Processing Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" /> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 548 | <to uri="direct:delete-guard-policy" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 549 | </split> |
| 550 | </split> |
| 551 | <to |
| 552 | uri="bean:org.onap.clamp.loop.log.LoopService?method=deleteLoop(${header.loopName})" /> |
| 553 | <log |
| 554 | loggingLevel="INFO" |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 555 | message="DELETE request successfully executed for loop: ${header.loopName}" /> |
xg353y | 9ac3070 | 2019-04-19 13:55:40 +0200 | [diff] [blame] | 556 | <to |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 557 | 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] | 558 | <to |
| 559 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 560 | <doCatch> |
| 561 | <exception>java.lang.Exception</exception> |
| 562 | <handled> |
| 563 | <constant>false</constant> |
| 564 | </handled> |
| 565 | <to |
| 566 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> |
sebdet | 373b07b | 2019-04-26 12:04:26 +0200 | [diff] [blame] | 567 | <log |
| 568 | loggingLevel="ERROR" |
| 569 | message="DELETE request failed for loop: ${header.loopName}" /> |
| 570 | <to |
sebdet | 584cc4a | 2019-05-03 14:32:53 +0200 | [diff] [blame] | 571 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request failed, Error reported: ${exception}','ERROR',${exchangeProperty[loopObject]})" /> |
sebdet | 338c218 | 2019-04-25 12:33:31 +0200 | [diff] [blame] | 572 | </doCatch> |
| 573 | </doTry> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 574 | </route> |
| 575 | </put> |
xg353y | 39d82de | 2019-04-26 13:26:25 +0200 | [diff] [blame] | 576 | <get |
| 577 | uri="/v2/loop/getstatus/{loopName}" |
| 578 | outType="org.onap.clamp.loop.Loop" |
| 579 | produces="application/json"> |
| 580 | <route> |
sebdet | b328b37 | 2019-05-08 15:36:55 +0200 | [diff] [blame^] | 581 | <removeHeaders |
| 582 | pattern="*" |
| 583 | excludePattern="loopName" /> |
xg353y | 39d82de | 2019-04-26 13:26:25 +0200 | [diff] [blame] | 584 | <doTry> |
| 585 | <log |
| 586 | loggingLevel="INFO" |
| 587 | message="Get current status for loop: ${header.loopName}" /> |
| 588 | <to |
| 589 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get the closed loop status')" /> |
| 590 | <to |
| 591 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" /> |
| 592 | <to uri="direct:load-loop" /> |
| 593 | <to |
| 594 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive GET STATUS request','INFO',${exchangeProperty[loopObject]})" /> |
| 595 | <setProperty propertyName="raiseHttpExceptionFlag"> |
| 596 | <simple resultType="java.lang.Boolean">false</simple> |
| 597 | </setProperty> |
| 598 | <to uri="direct:get-status-from-policy" /> |
| 599 | <to uri="direct:get-status-from-dcae" /> |
| 600 | <to |
xg353y | 7e8938e | 2019-05-03 13:23:40 +0200 | [diff] [blame] | 601 | uri="bean:org.onap.clamp.loop.LoopOperation?method=updateLoopStatus(${exchangeProperty[loopObject]},${exchangeProperty[policyStatus]}, ${exchangeProperty[dcaeStatus]})" /> |
xg353y | 39d82de | 2019-04-26 13:26:25 +0200 | [diff] [blame] | 602 | <log |
| 603 | loggingLevel="INFO" |
xg353y | 7e8938e | 2019-05-03 13:23:40 +0200 | [diff] [blame] | 604 | message="Get Status request successfully executed. The new state is: ${body}" /> |
xg353y | 39d82de | 2019-04-26 13:26:25 +0200 | [diff] [blame] | 605 | <to |
| 606 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Get Status request successfully executed','INFO',${exchangeProperty[loopObject]})" /> |
| 607 | <to |
| 608 | uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" /> |
| 609 | <to |
| 610 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> |
| 611 | <doCatch> |
| 612 | <exception>java.lang.Exception</exception> |
| 613 | <handled> |
| 614 | <constant>false</constant> |
| 615 | </handled> |
| 616 | <to |
| 617 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> |
| 618 | <log |
| 619 | loggingLevel="ERROR" |
| 620 | message="Get Status request failed for loop: ${header.loopName}" /> |
| 621 | <to |
sebdet | b328b37 | 2019-05-08 15:36:55 +0200 | [diff] [blame^] | 622 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Get Status request failed, Error reported: ${exception}','ERROR',${exchangeProperty[loopObject]})" /> |
xg353y | 39d82de | 2019-04-26 13:26:25 +0200 | [diff] [blame] | 623 | </doCatch> |
| 624 | </doTry> |
| 625 | </route> |
| 626 | </get> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 627 | </rest> |
Krysiak Adam | 5f14c7a | 2019-03-01 15:32:19 +0100 | [diff] [blame] | 628 | </rests> |