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> |
| 8 | <to |
| 9 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" /> |
| 10 | <to |
| 11 | uri="bean:org.onap.clamp.loop.LoopController?method=getLoopNames()" /> |
| 12 | </route> |
| 13 | </get> |
| 14 | <get |
| 15 | uri="/v2/loop/{loopName}" |
| 16 | outType="org.onap.clamp.loop.Loop" |
| 17 | produces="application/json"> |
| 18 | <route> |
| 19 | <to |
| 20 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" /> |
| 21 | <to |
| 22 | uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" /> |
| 23 | </route> |
| 24 | </get> |
| 25 | <get |
| 26 | uri="/v2/loop/svgRepresentation/{loopName}" |
| 27 | outType="java.lang.String" |
| 28 | produces="application/xml"> |
| 29 | <route> |
| 30 | <to |
| 31 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" /> |
| 32 | <to |
| 33 | uri="bean:org.onap.clamp.loop.LoopController?method=getSVGRepresentation(${header.loopName})" /> |
| 34 | </route> |
| 35 | </get> |
michal.banka | 89695a3 | 2019-03-12 13:01:26 +0100 | [diff] [blame] | 36 | |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 37 | <post |
| 38 | uri="/v2/loop/updateGlobalProperties/{loopName}" |
| 39 | type="com.google.gson.JsonObject" |
| 40 | consumes="application/json" |
| 41 | outType="org.onap.clamp.loop.Loop" |
| 42 | produces="application/json"> |
| 43 | <route> |
| 44 | <to |
| 45 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 46 | <setHeader headerName="GlobalPropertiesJson"> |
| 47 | <simple>${body}</simple> |
| 48 | </setHeader> |
| 49 | <to uri="direct:load-loop" /> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 50 | <to |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 51 | uri="bean:org.onap.clamp.loop.LoopController?method=updateGlobalPropertiesJson(${header.loopName},${header.GlobalPropertiesJson})" /> |
| 52 | <to |
| 53 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Global Properties UPDATED','INFO',${header.LoopObject})" /> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 54 | </route> |
| 55 | </post> |
| 56 | <post |
| 57 | uri="/v2/loop/updateOperationalPolicies/{loopName}" |
| 58 | type="com.google.gson.JsonArray" |
| 59 | consumes="application/json" |
| 60 | outType="org.onap.clamp.loop.Loop" |
| 61 | produces="application/json"> |
| 62 | <route> |
| 63 | <to |
| 64 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 65 | <setHeader headerName="OperationalPoliciesArray"> |
| 66 | <simple>${body}</simple> |
| 67 | </setHeader> |
| 68 | <to uri="direct:load-loop" /> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 69 | <to |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 70 | uri="bean:org.onap.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${header.OperationalPoliciesArray})" /> |
| 71 | <to |
| 72 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Operational and Guard policies UPDATED','INFO',${header.LoopObject})" /> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 73 | </route> |
| 74 | </post> |
| 75 | <post |
| 76 | uri="/v2/loop/updateMicroservicePolicy/{loopName}" |
| 77 | type="org.onap.clamp.policy.microservice.MicroServicePolicy" |
| 78 | consumes="application/json" |
| 79 | outType="org.onap.clamp.policy.microservice.MicroServicePolicy" |
| 80 | produces="application/json"> |
| 81 | <route> |
| 82 | <to |
| 83 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 84 | <setHeader headerName="MicroServicePolicyObject"> |
| 85 | <simple>${body}</simple> |
| 86 | </setHeader> |
| 87 | |
| 88 | <to uri="direct:load-loop" /> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 89 | <to |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 90 | uri="bean:org.onap.clamp.loop.LoopController?method=updateMicroservicePolicy(${header.loopName},${header.MicroServicePolicyObject})" /> |
| 91 | <to |
| 92 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Micro Service policies UPDATED','INFO',${header.LoopObject})" /> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 93 | </route> |
| 94 | </post> |
| 95 | <put |
| 96 | uri="/v2/loop/deployLoop/{loopName}" |
| 97 | outType="org.onap.clamp.loop.Loop" |
| 98 | produces="application/json"> |
| 99 | <route> |
| 100 | <to |
| 101 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 102 | <to |
| 103 | uri="bean:org.onap.clamp.operation.LoopOperation?method=deployLoop(*,${header.loopName})" /> |
| 104 | </route> |
| 105 | </put> |
| 106 | <put |
| 107 | uri="/v2/loop/undeployLoop/{loopName}" |
| 108 | outType="org.onap.clamp.loop.Loop" |
| 109 | produces="application/json"> |
| 110 | <route> |
| 111 | <to |
| 112 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 113 | <to |
| 114 | uri="bean:org.onap.clamp.operation.LoopOperation?method=unDeployLoop(${header.loopName})" /> |
| 115 | </route> |
| 116 | </put> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 117 | <put |
sebdet | 1efe60f | 2019-04-11 17:58:36 +0200 | [diff] [blame^] | 118 | uri="/v2/loop/stop/{loopName}" |
| 119 | outType="org.onap.clamp.loop.Loop" |
| 120 | produces="application/json"> |
| 121 | <route> |
| 122 | <log |
| 123 | loggingLevel="INFO" |
| 124 | message="Receive STOP request for loop: ${header.loopName}" /> |
| 125 | </route> |
| 126 | <to |
| 127 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 128 | <to uri="direct:load-loop" /> |
| 129 | <to uri="direct:remove-all-policy-from-active-pdp-group" /> |
| 130 | <log |
| 131 | loggingLevel="INFO" |
| 132 | message="STOP request successfully executed for loop: ${body}" /> |
| 133 | <to |
| 134 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request successfully executed','INFO',${header.LoopObject})" /> |
| 135 | <to |
| 136 | uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" /> |
| 137 | </put> |
| 138 | <put |
| 139 | uri="/v2/loop/start/{loopName}" |
| 140 | outType="org.onap.clamp.loop.Loop" |
| 141 | produces="application/json"> |
| 142 | <route> |
| 143 | <log |
| 144 | loggingLevel="INFO" |
| 145 | message="Receive START request for loop: ${header.loopName}" /> |
| 146 | </route> |
| 147 | <to |
| 148 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
| 149 | <to uri="direct:load-loop" /> |
| 150 | <to uri="direct:add-all-to-active-pdp-group" /> |
| 151 | <log |
| 152 | loggingLevel="INFO" |
| 153 | message="START request successfully executed for loop: ${body}" /> |
| 154 | <to |
| 155 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('START request successfully executed','INFO',${header.LoopObject})" /> |
| 156 | <to |
| 157 | uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" /> |
| 158 | </put> |
| 159 | <put |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 160 | uri="/v2/loop/submit/{loopName}" |
| 161 | outType="org.onap.clamp.loop.Loop" |
| 162 | produces="application/json"> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 163 | <route> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 164 | <log |
| 165 | loggingLevel="INFO" |
| 166 | message="Receive SUBMIT request for loop: ${header.loopName}" /> |
| 167 | <to |
| 168 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 169 | <to uri="direct:load-loop" /> |
sebdet | ea77586 | 2019-04-09 13:08:10 +0200 | [diff] [blame] | 170 | <to |
| 171 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive SUBMIT request','INFO',${header.LoopObject})" /> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 172 | <setHeader headerName="RaiseHttpExceptionFlag"> |
| 173 | <simple resultType="java.lang.Boolean">false</simple> |
| 174 | </setHeader> |
| 175 | <to uri="direct:remove-all-policy-from-active-pdp-group" /> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 176 | <log |
| 177 | loggingLevel="INFO" |
| 178 | message="Processing all MICRO-SERVICES policies defined in loop ${header.LoopObject.getName()}" /> |
| 179 | <split> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 180 | <simple>${header.LoopObject.getMicroServicePolicies()} |
| 181 | </simple> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 182 | <setHeader headerName="microServicePolicy"> |
| 183 | <simple>${body}</simple> |
| 184 | </setHeader> |
| 185 | <log |
| 186 | loggingLevel="INFO" |
| 187 | message="Processing Micro Service Policy: ${header.microServicePolicy.getName()}" /> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 188 | <setHeader headerName="RaiseHttpExceptionFlag"> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 189 | <simple resultType="java.lang.Boolean">false</simple> |
| 190 | </setHeader> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 191 | <to uri="direct:delete-micro-service-policy" /> |
| 192 | |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 193 | <to uri="direct:create-micro-service-policy" /> |
| 194 | </split> |
| 195 | |
| 196 | <log |
| 197 | loggingLevel="INFO" |
| 198 | message="Processing all OPERATIONAL policies defined in loop ${header.LoopObject.getName()}" /> |
| 199 | <split> |
| 200 | <simple>${header.LoopObject.getOperationalPolicies()} |
| 201 | </simple> |
| 202 | <setHeader headerName="operationalPolicy"> |
| 203 | <simple>${body}</simple> |
| 204 | </setHeader> |
| 205 | <log |
| 206 | loggingLevel="INFO" |
| 207 | message="Processing Operational Policy: ${header.operationalPolicy.getName()}" /> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 208 | <setHeader headerName="RaiseHttpExceptionFlag"> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 209 | <simple resultType="java.lang.Boolean">false</simple> |
| 210 | </setHeader> |
| 211 | <to uri="direct:delete-operational-policy" /> |
| 212 | |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 213 | <to uri="direct:create-operational-policy" /> |
| 214 | <log |
| 215 | loggingLevel="INFO" |
| 216 | message="Processing all GUARD policies defined in loop ${header.LoopObject.getName()}" /> |
| 217 | <split> |
| 218 | <simple>${header.operationalPolicy.createGuardPolicyPayloads().entrySet()} |
| 219 | </simple> |
| 220 | <setHeader headerName="guardPolicy"> |
| 221 | <simple>${body}</simple> |
| 222 | </setHeader> |
| 223 | <log |
| 224 | loggingLevel="INFO" |
| 225 | message="Processing Guard Policy: ${header.guardPolicy.getKey()}" /> |
| 226 | |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 227 | <setHeader headerName="RaiseHttpExceptionFlag"> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 228 | <simple resultType="java.lang.Boolean">false</simple> |
| 229 | </setHeader> |
| 230 | <to uri="direct:delete-guard-policy" /> |
| 231 | |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 232 | <to uri="direct:create-guard-policy" /> |
| 233 | </split> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 234 | </split> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 235 | <to uri="direct:add-all-to-active-pdp-group" /> |
| 236 | |
sebdet | eb71d70 | 2019-04-09 18:10:32 +0200 | [diff] [blame] | 237 | <log |
| 238 | loggingLevel="INFO" |
| 239 | message="SUBMIT request successfully executed for loop: ${body}" /> |
| 240 | <to |
| 241 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request successfully executed','INFO',${header.LoopObject})" /> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 242 | <to |
| 243 | uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" /> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 244 | </route> |
| 245 | </put> |
sebdet | 919ef9d | 2019-04-08 18:32:26 +0200 | [diff] [blame] | 246 | <put uri="/v2/loop/delete/{loopName}"> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 247 | <route> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 248 | <log |
| 249 | loggingLevel="INFO" |
| 250 | message="Receive DELETE request for loop: ${header.loopName}" /> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 251 | <to |
| 252 | uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 253 | <to uri="direct:load-loop" /> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 254 | <to |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 255 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive DELETE request','INFO',${header.LoopObject})" /> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 256 | <to uri="direct:remove-all-policy-from-active-pdp-group" /> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 257 | <split> |
| 258 | <simple>${header.LoopObject.getMicroServicePolicies()} |
| 259 | </simple> |
| 260 | <setHeader headerName="microServicePolicy"> |
| 261 | <simple>${body}</simple> |
| 262 | </setHeader> |
| 263 | <log |
| 264 | loggingLevel="INFO" |
| 265 | message="Processing Micro Service Policy: ${header.microServicePolicy.getName()}" /> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 266 | |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 267 | <to uri="direct:delete-micro-service-policy" /> |
| 268 | </split> |
| 269 | |
| 270 | <log |
| 271 | loggingLevel="INFO" |
| 272 | message="Processing all OPERATIONAL policies defined in loop ${header.LoopObject.getName()}" /> |
| 273 | <split> |
| 274 | <simple>${header.LoopObject.getOperationalPolicies()} |
| 275 | </simple> |
| 276 | <setHeader headerName="operationalPolicy"> |
| 277 | <simple>${body}</simple> |
| 278 | </setHeader> |
| 279 | <log |
| 280 | loggingLevel="INFO" |
| 281 | message="Processing Operational Policy: ${header.operationalPolicy.getName()}" /> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 282 | |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 283 | <to uri="direct:delete-operational-policy" /> |
| 284 | <log |
| 285 | loggingLevel="INFO" |
| 286 | message="Processing all GUARD policies defined in loop ${header.LoopObject.getName()}" /> |
| 287 | <split> |
| 288 | <simple>${header.operationalPolicy.createGuardPolicyPayloads().entrySet()} |
| 289 | </simple> |
| 290 | <setHeader headerName="guardPolicy"> |
| 291 | <simple>${body}</simple> |
| 292 | </setHeader> |
| 293 | <log |
| 294 | loggingLevel="INFO" |
| 295 | message="Processing Guard Policy: ${header.guardPolicy.getKey()}" /> |
| 296 | |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 297 | <to uri="direct:delete-guard-policy" /> |
| 298 | </split> |
| 299 | </split> |
sebdet | 667cb72 | 2019-04-11 02:07:44 +0200 | [diff] [blame] | 300 | <to |
| 301 | uri="bean:org.onap.clamp.loop.log.LoopService?method=deleteLoop(${header.loopName})" /> |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 302 | <log |
| 303 | loggingLevel="INFO" |
| 304 | message="DELETE request successfully executed for loop: ${body}" /> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 305 | <to |
sebdet | cd64cc4 | 2019-04-10 14:07:35 +0200 | [diff] [blame] | 306 | uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request successfully executed','INFO',${header.LoopObject})" /> |
sebdet | dfa86ca | 2019-04-05 15:15:31 +0200 | [diff] [blame] | 307 | </route> |
| 308 | </put> |
| 309 | </rest> |
Krysiak Adam | 5f14c7a | 2019-03-01 15:32:19 +0100 | [diff] [blame] | 310 | </rests> |
| 311 | |