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