sebdet | 09bc845 | 2019-05-23 17:34:07 +0200 | [diff] [blame] | 1 | |
| 2 | <routes xmlns="http://camel.apache.org/schema/spring"> |
| 3 | <route id="get-policy"> |
| 4 | <from uri="direct:get-policy" /> |
| 5 | <doTry> |
| 6 | <log |
| 7 | loggingLevel="INFO" |
| 8 | message="Getting Policy: ${exchangeProperty[policyName]}" /> |
| 9 | <to |
| 10 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Get Policy')" /> |
| 11 | <setHeader headerName="CamelHttpMethod"> |
| 12 | <constant>GET</constant> |
| 13 | </setHeader> |
| 14 | <setHeader headerName="X-ONAP-RequestID"> |
| 15 | <simple>${exchangeProperty[X-ONAP-RequestID]} |
| 16 | </simple> |
| 17 | </setHeader> |
| 18 | <setHeader headerName="X-ONAP-InvocationID"> |
| 19 | <simple>${exchangeProperty[X-ONAP-InvocationID]} |
| 20 | </simple> |
| 21 | </setHeader> |
| 22 | <setHeader headerName="X-ONAP-PartnerName"> |
| 23 | <simple>${exchangeProperty[X-ONAP-PartnerName]} |
| 24 | </simple> |
| 25 | </setHeader> |
| 26 | <log |
| 27 | loggingLevel="INFO" |
| 28 | message="Endpoint to get policy: {{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[policyType]}/versions/1.0.0/policies/${exchangeProperty[policyName]}/versions/1.0.0"></log> |
| 29 | <toD |
sebdet | 493e9e7 | 2019-06-13 12:12:09 +0200 | [diff] [blame] | 30 | uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[policyType]}/versions/1.0.0/policies/${exchangeProperty[policyName]}/versions/1.0.0?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.policy.api.userName}}&authPassword={{clamp.config.policy.api.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true" /> |
sebdet | 09bc845 | 2019-05-23 17:34:07 +0200 | [diff] [blame] | 31 | <doFinally> |
| 32 | <to uri="direct:reset-raise-http-exception-flag" /> |
| 33 | <to |
| 34 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" /> |
| 35 | <setProperty propertyName="logMessage"> |
| 36 | <simple>${exchangeProperty[policyName]} GET |
| 37 | Policy status |
| 38 | </simple> |
| 39 | </setProperty> |
| 40 | <to uri="direct:dump-loop-log-http-response" /> |
| 41 | </doFinally> |
| 42 | </doTry> |
| 43 | </route> |
| 44 | |
| 45 | <route id="get-deployment-policy"> |
| 46 | <from uri="direct:get-deployment-policy" /> |
| 47 | <doTry> |
| 48 | <log |
| 49 | loggingLevel="INFO" |
| 50 | message="Getting the policy deployment in PDP: ${exchangeProperty[policyName]}" /> |
| 51 | <to |
| 52 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Getting the policy deployment in PDP')" /> |
| 53 | <setHeader headerName="CamelHttpMethod"> |
| 54 | <constant>GET</constant> |
| 55 | </setHeader> |
| 56 | <setHeader headerName="X-ONAP-RequestID"> |
| 57 | <simple>${exchangeProperty[X-ONAP-RequestID]} |
| 58 | </simple> |
| 59 | </setHeader> |
| 60 | <setHeader headerName="X-ONAP-InvocationID"> |
| 61 | <simple>${exchangeProperty[X-ONAP-InvocationID]} |
| 62 | </simple> |
| 63 | </setHeader> |
| 64 | <setHeader headerName="X-ONAP-PartnerName"> |
| 65 | <simple>${exchangeProperty[X-ONAP-PartnerName]} |
| 66 | </simple> |
| 67 | </setHeader> |
| 68 | <log |
| 69 | loggingLevel="INFO" |
| 70 | message="Endpoint to get policy deployment status: {{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[policyType]}/versions/1.0.0/policies/${exchangeProperty[policyName]}/versions/deployed"></log> |
| 71 | <toD |
sebdet | 493e9e7 | 2019-06-13 12:12:09 +0200 | [diff] [blame] | 72 | uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[policyType]}/versions/1.0.0/policies/${exchangeProperty[policyName]}/versions/deployed?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.policy.api.userName}}&authPassword={{clamp.config.policy.api.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true" /> |
sebdet | 09bc845 | 2019-05-23 17:34:07 +0200 | [diff] [blame] | 73 | <doFinally> |
| 74 | <to uri="direct:reset-raise-http-exception-flag" /> |
| 75 | <to |
| 76 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" /> |
| 77 | <setProperty propertyName="logMessage"> |
| 78 | <simple>${exchangeProperty[policyName]} GET Policy deployment |
| 79 | status |
| 80 | </simple> |
| 81 | </setProperty> |
| 82 | <to uri="direct:dump-loop-log-http-response" /> |
| 83 | </doFinally> |
| 84 | </doTry> |
| 85 | </route> |
| 86 | <route id="create-micro-service-policy"> |
| 87 | <from uri="direct:create-micro-service-policy" /> |
| 88 | <doTry> |
| 89 | <log |
| 90 | loggingLevel="INFO" |
| 91 | message="Creating Micro Service Policy: ${exchangeProperty[microServicePolicy].getName()}" /> |
| 92 | <to |
| 93 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Create Micro Service Policy')" /> |
| 94 | <setBody> |
| 95 | <simple>${exchangeProperty[microServicePolicy].createPolicyPayload()} |
| 96 | </simple> |
| 97 | </setBody> |
| 98 | <setHeader headerName="CamelHttpMethod"> |
| 99 | <constant>POST</constant> |
| 100 | </setHeader> |
| 101 | <setHeader headerName="Content-Type"> |
| 102 | <constant>application/json</constant> |
| 103 | </setHeader> |
| 104 | <setHeader headerName="X-ONAP-RequestID"> |
| 105 | <simple>${exchangeProperty[X-ONAP-RequestID]} |
| 106 | </simple> |
| 107 | </setHeader> |
| 108 | <setHeader headerName="X-ONAP-InvocationID"> |
| 109 | <simple>${exchangeProperty[X-ONAP-InvocationID]} |
| 110 | </simple> |
| 111 | </setHeader> |
| 112 | <setHeader headerName="X-ONAP-PartnerName"> |
| 113 | <simple>${exchangeProperty[X-ONAP-PartnerName]} |
| 114 | </simple> |
| 115 | </setHeader> |
| 116 | <log |
| 117 | loggingLevel="INFO" |
| 118 | message="Endpoint to create microservice policy: {{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[microServicePolicy].getModelType()}/versions/1.0.0/policies"></log> |
| 119 | <toD |
sebdet | 493e9e7 | 2019-06-13 12:12:09 +0200 | [diff] [blame] | 120 | uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[microServicePolicy].getModelType()}/versions/1.0.0/policies?bridgeEndpoint=true&useSystemProperties=true&mapHttpMessageHeaders=false&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authUsername={{clamp.config.policy.api.userName}}&authPassword={{clamp.config.policy.api.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true" /> |
sebdet | 09bc845 | 2019-05-23 17:34:07 +0200 | [diff] [blame] | 121 | <doFinally> |
| 122 | <to uri="direct:reset-raise-http-exception-flag" /> |
| 123 | <to |
| 124 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" /> |
| 125 | <setProperty propertyName="logMessage"> |
| 126 | <simple>${exchangeProperty[microServicePolicy].getName()} creation |
| 127 | status |
| 128 | </simple> |
| 129 | </setProperty> |
| 130 | <to uri="direct:dump-loop-log-http-response" /> |
| 131 | </doFinally> |
| 132 | </doTry> |
| 133 | </route> |
| 134 | |
| 135 | <route id="delete-micro-service-policy"> |
| 136 | <from uri="direct:delete-micro-service-policy" /> |
| 137 | <doTry> |
| 138 | <log |
| 139 | loggingLevel="INFO" |
| 140 | message="Deleting Micro Service Policy: ${exchangeProperty[microServicePolicy].getName()}" /> |
| 141 | <to |
| 142 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Delete Micro Service Policy')" /> |
| 143 | <setBody> |
| 144 | <constant>null</constant> |
| 145 | </setBody> |
| 146 | <setHeader headerName="CamelHttpMethod"> |
| 147 | <constant>DELETE</constant> |
| 148 | </setHeader> |
| 149 | <setHeader headerName="X-ONAP-RequestID"> |
| 150 | <simple>${exchangeProperty[X-ONAP-RequestID]} |
| 151 | </simple> |
| 152 | </setHeader> |
| 153 | <setHeader headerName="X-ONAP-InvocationID"> |
| 154 | <simple>${exchangeProperty[X-ONAP-InvocationID]} |
| 155 | </simple> |
| 156 | </setHeader> |
| 157 | <setHeader headerName="X-ONAP-PartnerName"> |
| 158 | <simple>${exchangeProperty[X-ONAP-PartnerName]} |
| 159 | </simple> |
| 160 | </setHeader> |
| 161 | <log |
| 162 | loggingLevel="INFO" |
| 163 | message="Endpoint to delete microservice policy: {{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[microServicePolicy].getModelType()}/versions/1.0.0/policies/${exchangeProperty[microServicePolicy].getName()}/versions/1.0.0"></log> |
| 164 | <toD |
sebdet | 493e9e7 | 2019-06-13 12:12:09 +0200 | [diff] [blame] | 165 | uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[microServicePolicy].getModelType()}/versions/1.0.0/policies/${exchangeProperty[microServicePolicy].getName()}/versions/1.0.0?bridgeEndpoint=true&useSystemProperties=true&mapHttpMessageHeaders=false&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&deleteWithBody=false&mapHttpMessageBody=false&mapHttpMessageFormUrlEncodedBody=false&authUsername={{clamp.config.policy.api.userName}}&authPassword={{clamp.config.policy.api.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true" /> |
sebdet | 09bc845 | 2019-05-23 17:34:07 +0200 | [diff] [blame] | 166 | |
| 167 | <doFinally> |
| 168 | <to uri="direct:reset-raise-http-exception-flag" /> |
| 169 | <to |
| 170 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" /> |
| 171 | <setProperty propertyName="logMessage"> |
| 172 | <simple>${exchangeProperty[microServicePolicy].getName()} removal |
| 173 | status |
| 174 | </simple> |
| 175 | </setProperty> |
| 176 | <to uri="direct:dump-loop-log-http-response" /> |
| 177 | </doFinally> |
| 178 | </doTry> |
| 179 | </route> |
| 180 | |
| 181 | <route id="create-operational-policy"> |
| 182 | <from uri="direct:create-operational-policy" /> |
| 183 | <doTry> |
| 184 | <log |
| 185 | loggingLevel="INFO" |
| 186 | message="Creating Operational Policy: ${exchangeProperty[operationalPolicy].getName()}" /> |
| 187 | <to |
| 188 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Create Operational Policy')" /> |
| 189 | <setBody> |
| 190 | <simple>${exchangeProperty[operationalPolicy].createPolicyPayload()} |
| 191 | </simple> |
| 192 | </setBody> |
| 193 | <setHeader headerName="CamelHttpMethod"> |
| 194 | <constant>POST</constant> |
| 195 | </setHeader> |
| 196 | <setHeader headerName="Content-Type"> |
| 197 | <constant>application/json</constant> |
| 198 | </setHeader> |
| 199 | <setHeader headerName="X-ONAP-RequestID"> |
| 200 | <simple>${exchangeProperty[X-ONAP-RequestID]} |
| 201 | </simple> |
| 202 | </setHeader> |
| 203 | <setHeader headerName="X-ONAP-InvocationID"> |
| 204 | <simple>${exchangeProperty[X-ONAP-InvocationID]} |
| 205 | </simple> |
| 206 | </setHeader> |
| 207 | <setHeader headerName="X-ONAP-PartnerName"> |
| 208 | <simple>${exchangeProperty[X-ONAP-PartnerName]} |
| 209 | </simple> |
| 210 | </setHeader> |
| 211 | <log |
| 212 | loggingLevel="INFO" |
| 213 | message="Endpoint to create operational policy: {{clamp.config.policy.api.url}}/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies"></log> |
| 214 | <toD |
sebdet | 493e9e7 | 2019-06-13 12:12:09 +0200 | [diff] [blame] | 215 | uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies?bridgeEndpoint=true&useSystemProperties=true&mapHttpMessageHeaders=false&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authUsername={{clamp.config.policy.api.userName}}&authPassword={{clamp.config.policy.api.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true" /> |
sebdet | 09bc845 | 2019-05-23 17:34:07 +0200 | [diff] [blame] | 216 | <doFinally> |
| 217 | <to uri="direct:reset-raise-http-exception-flag" /> |
| 218 | <to |
| 219 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" /> |
| 220 | <setProperty propertyName="logMessage"> |
| 221 | <simple>${exchangeProperty[operationalPolicy].getName()} creation |
| 222 | status |
| 223 | </simple> |
| 224 | </setProperty> |
| 225 | <to uri="direct:dump-loop-log-http-response" /> |
| 226 | </doFinally> |
| 227 | </doTry> |
| 228 | </route> |
| 229 | |
| 230 | <route id="delete-operational-policy"> |
| 231 | <from uri="direct:delete-operational-policy" /> |
| 232 | <doTry> |
| 233 | <log |
| 234 | loggingLevel="INFO" |
| 235 | message="Deleting Operational Policy: ${exchangeProperty[operationalPolicy].getName()}" /> |
| 236 | <to |
| 237 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Delete Operational Policy')" /> |
| 238 | <setBody> |
| 239 | <constant>null</constant> |
| 240 | </setBody> |
| 241 | <setHeader headerName="CamelHttpMethod"> |
| 242 | <constant>DELETE</constant> |
| 243 | </setHeader> |
| 244 | <setHeader headerName="X-ONAP-RequestID"> |
| 245 | <simple>${exchangeProperty[X-ONAP-RequestID]} |
| 246 | </simple> |
| 247 | </setHeader> |
| 248 | <setHeader headerName="X-ONAP-InvocationID"> |
| 249 | <simple>${exchangeProperty[X-ONAP-InvocationID]} |
| 250 | </simple> |
| 251 | </setHeader> |
| 252 | <setHeader headerName="X-ONAP-PartnerName"> |
| 253 | <simple>${exchangeProperty[X-ONAP-PartnerName]} |
| 254 | </simple> |
| 255 | </setHeader> |
| 256 | <log |
| 257 | loggingLevel="INFO" |
| 258 | message="Endpoint to delete operational policy: {{clamp.config.policy.api.url}}/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/${exchangeProperty[operationalPolicy].getName()}/versions/1"></log> |
| 259 | <toD |
sebdet | 493e9e7 | 2019-06-13 12:12:09 +0200 | [diff] [blame] | 260 | uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/${exchangeProperty[operationalPolicy].getName()}/versions/1?bridgeEndpoint=true&useSystemProperties=true&mapHttpMessageHeaders=false&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&deleteWithBody=false&mapHttpMessageBody=false&mapHttpMessageFormUrlEncodedBody=false&authUsername={{clamp.config.policy.api.userName}}&authPassword={{clamp.config.policy.api.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true" /> |
sebdet | 09bc845 | 2019-05-23 17:34:07 +0200 | [diff] [blame] | 261 | <doFinally> |
| 262 | <to uri="direct:reset-raise-http-exception-flag" /> |
| 263 | <to |
| 264 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" /> |
| 265 | <setProperty propertyName="logMessage"> |
| 266 | <simple>${exchangeProperty[operationalPolicy].getName()} removal |
| 267 | status |
| 268 | </simple> |
| 269 | </setProperty> |
| 270 | <to uri="direct:dump-loop-log-http-response" /> |
| 271 | </doFinally> |
| 272 | </doTry> |
| 273 | </route> |
| 274 | |
| 275 | <route id="create-guard-policy"> |
| 276 | <from uri="direct:create-guard-policy" /> |
| 277 | <doTry> |
| 278 | <log |
| 279 | loggingLevel="INFO" |
| 280 | message="Creating Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" /> |
| 281 | <to |
| 282 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Create Guard Policy')" /> |
| 283 | <setBody> |
| 284 | <simple>${exchangeProperty[guardPolicy].getValue()} |
| 285 | </simple> |
| 286 | </setBody> |
| 287 | <setHeader headerName="CamelHttpMethod"> |
| 288 | <constant>POST</constant> |
| 289 | </setHeader> |
| 290 | <setHeader headerName="Content-Type"> |
| 291 | <constant>application/json</constant> |
| 292 | </setHeader> |
| 293 | <setHeader headerName="X-ONAP-RequestID"> |
| 294 | <simple>${exchangeProperty[X-ONAP-RequestID]} |
| 295 | </simple> |
| 296 | </setHeader> |
| 297 | <setHeader headerName="X-ONAP-InvocationID"> |
| 298 | <simple>${exchangeProperty[X-ONAP-InvocationID]} |
| 299 | </simple> |
| 300 | </setHeader> |
| 301 | <setHeader headerName="X-ONAP-PartnerName"> |
| 302 | <simple>${exchangeProperty[X-ONAP-PartnerName]} |
| 303 | </simple> |
| 304 | </setHeader> |
| 305 | <log |
| 306 | loggingLevel="INFO" |
| 307 | message="Endpoint to create guard policy: {{clamp.config.policy.api.url}}/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies"></log> |
| 308 | <toD |
sebdet | 493e9e7 | 2019-06-13 12:12:09 +0200 | [diff] [blame] | 309 | uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies?bridgeEndpoint=true&useSystemProperties=true&mapHttpMessageHeaders=false&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authUsername={{clamp.config.policy.api.userName}}&authPassword={{clamp.config.policy.api.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true" /> |
sebdet | 09bc845 | 2019-05-23 17:34:07 +0200 | [diff] [blame] | 310 | <doFinally> |
| 311 | <to uri="direct:reset-raise-http-exception-flag" /> |
| 312 | <to |
| 313 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" /> |
| 314 | <setProperty propertyName="logMessage"> |
| 315 | <simple>${exchangeProperty[guardPolicy].getKey()} creation status |
| 316 | </simple> |
| 317 | </setProperty> |
| 318 | <to uri="direct:dump-loop-log-http-response" /> |
| 319 | </doFinally> |
| 320 | </doTry> |
| 321 | </route> |
| 322 | |
| 323 | <route id="delete-guard-policy"> |
| 324 | <from uri="direct:delete-guard-policy" /> |
| 325 | <doTry> |
| 326 | <log |
| 327 | loggingLevel="INFO" |
| 328 | message="Deleting Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" /> |
| 329 | <to |
| 330 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Delete Guard Policy')" /> |
| 331 | <setBody> |
| 332 | <constant>null</constant> |
| 333 | </setBody> |
| 334 | <setHeader headerName="CamelHttpMethod"> |
| 335 | <constant>DELETE</constant> |
| 336 | </setHeader> |
| 337 | <setHeader headerName="X-ONAP-RequestID"> |
| 338 | <simple>${exchangeProperty[X-ONAP-RequestID]} |
| 339 | </simple> |
| 340 | </setHeader> |
| 341 | <setHeader headerName="X-ONAP-InvocationID"> |
| 342 | <simple>${exchangeProperty[X-ONAP-InvocationID]} |
| 343 | </simple> |
| 344 | </setHeader> |
| 345 | <setHeader headerName="X-ONAP-PartnerName"> |
| 346 | <simple>${exchangeProperty[X-ONAP-PartnerName]} |
| 347 | </simple> |
| 348 | </setHeader> |
| 349 | <log |
| 350 | loggingLevel="INFO" |
| 351 | message="Endpoint to delete guard policy: {{clamp.config.policy.api.url}}/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/${exchangeProperty[guardPolicy].getKey()}/versions/1"></log> |
| 352 | <toD |
sebdet | 493e9e7 | 2019-06-13 12:12:09 +0200 | [diff] [blame] | 353 | uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/${exchangeProperty[guardPolicy].getKey()}/versions/1?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&deleteWithBody=false&mapHttpMessageBody=false&mapHttpMessageFormUrlEncodedBody=false&authUsername={{clamp.config.policy.api.userName}}&authPassword={{clamp.config.policy.api.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true" /> |
sebdet | 09bc845 | 2019-05-23 17:34:07 +0200 | [diff] [blame] | 354 | |
| 355 | <doFinally> |
| 356 | <to uri="direct:reset-raise-http-exception-flag" /> |
| 357 | <to |
| 358 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" /> |
| 359 | <setProperty propertyName="logMessage"> |
| 360 | <simple>${exchangeProperty[guardPolicy].getKey()} removal status |
| 361 | </simple> |
| 362 | </setProperty> |
| 363 | <to uri="direct:dump-loop-log-http-response" /> |
| 364 | </doFinally> |
| 365 | </doTry> |
| 366 | </route> |
| 367 | |
| 368 | <route id="add-all-to-active-pdp-group"> |
| 369 | <from uri="direct:add-all-to-active-pdp-group" /> |
| 370 | <doTry> |
| 371 | <log |
| 372 | loggingLevel="INFO" |
| 373 | message="Adding loop policies to PDP Group: ${exchangeProperty[loopObject].getName()}" /> |
| 374 | <to |
| 375 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Add policies to PDP group')" /> |
| 376 | <setBody> |
| 377 | <simple>${exchangeProperty[loopObject].getComponent("POLICY").createPoliciesPayloadPdpGroup(exchangeProperty[loopObject])} |
| 378 | </simple> |
| 379 | </setBody> |
| 380 | <setHeader headerName="CamelHttpMethod"> |
| 381 | <constant>POST</constant> |
| 382 | </setHeader> |
| 383 | <setHeader headerName="Content-Type"> |
| 384 | <constant>application/json</constant> |
| 385 | </setHeader> |
| 386 | <setHeader headerName="X-ONAP-RequestID"> |
| 387 | <simple>${exchangeProperty[X-ONAP-RequestID]} |
| 388 | </simple> |
| 389 | </setHeader> |
| 390 | <setHeader headerName="X-ONAP-InvocationID"> |
| 391 | <simple>${exchangeProperty[X-ONAP-InvocationID]} |
| 392 | </simple> |
| 393 | </setHeader> |
| 394 | <setHeader headerName="X-ONAP-PartnerName"> |
| 395 | <simple>${exchangeProperty[X-ONAP-PartnerName]} |
| 396 | </simple> |
| 397 | </setHeader> |
| 398 | <log |
| 399 | loggingLevel="INFO" |
| 400 | message="Endpoint to add policies to PDP Group: {{clamp.config.policy.pap.url}}/policy/pap/v1/pdps/policies"></log> |
| 401 | <toD |
sebdet | 493e9e7 | 2019-06-13 12:12:09 +0200 | [diff] [blame] | 402 | uri="{{clamp.config.policy.pap.url}}/policy/pap/v1/pdps/policies?bridgeEndpoint=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&useSystemProperties=true&authUsername={{clamp.config.policy.pap.userName}}&authPassword={{clamp.config.policy.pap.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true" /> |
sebdet | 09bc845 | 2019-05-23 17:34:07 +0200 | [diff] [blame] | 403 | |
| 404 | <doFinally> |
| 405 | <to uri="direct:reset-raise-http-exception-flag" /> |
| 406 | <to |
| 407 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" /> |
| 408 | <setProperty propertyName="logMessage"> |
| 409 | <simple>PDP Group push ALL status</simple> |
| 410 | </setProperty> |
| 411 | <to uri="direct:dump-loop-log-http-response" /> |
| 412 | </doFinally> |
| 413 | </doTry> |
| 414 | </route> |
| 415 | |
| 416 | <route id="remove-all-policy-from-active-pdp-group"> |
| 417 | <from uri="direct:remove-all-policy-from-active-pdp-group" /> |
| 418 | <doTry> |
| 419 | <log |
| 420 | loggingLevel="INFO" |
| 421 | message="Removing policies from active PDP group for loop: ${exchangeProperty[loopObject].getName()}" /> |
| 422 | <to |
| 423 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Removing policies PDP group')" /> |
| 424 | <split> |
| 425 | <simple>${exchangeProperty[loopObject].getComponent("POLICY").listPolicyNamesPdpGroup(exchangeProperty[loopObject])} |
| 426 | </simple> |
| 427 | <setProperty propertyName="policyName"> |
| 428 | <simple>${body}</simple> |
| 429 | </setProperty> |
| 430 | <setBody> |
| 431 | <constant>null</constant> |
| 432 | </setBody> |
| 433 | <setHeader headerName="CamelHttpMethod"> |
| 434 | <constant>DELETE</constant> |
| 435 | </setHeader> |
| 436 | <setHeader headerName="X-ONAP-RequestID"> |
| 437 | <simple>${exchangeProperty[X-ONAP-RequestID]} |
| 438 | </simple> |
| 439 | </setHeader> |
| 440 | <setHeader headerName="X-ONAP-InvocationID"> |
| 441 | <simple>${exchangeProperty[X-ONAP-InvocationID]} |
| 442 | </simple> |
| 443 | </setHeader> |
| 444 | <setHeader headerName="X-ONAP-PartnerName"> |
| 445 | <simple>${exchangeProperty[X-ONAP-PartnerName]} |
| 446 | </simple> |
| 447 | </setHeader> |
| 448 | <log |
| 449 | loggingLevel="INFO" |
| 450 | message="Endpoint to delete policy from PDP Group: {{clamp.config.policy.pap.url}}/pdps/policies/${exchangeProperty[policyName]}/versions/1.0.0"></log> |
| 451 | <toD |
sebdet | 493e9e7 | 2019-06-13 12:12:09 +0200 | [diff] [blame] | 452 | uri="{{clamp.config.policy.pap.url}}/policy/pap/v1/pdps/policies/${exchangeProperty[policyName]}/versions/1.0.0?bridgeEndpoint=true&useSystemProperties=true&mapHttpMessageHeaders=false&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authUsername={{clamp.config.policy.pap.userName}}&authPassword={{clamp.config.policy.pap.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true" /> |
sebdet | 09bc845 | 2019-05-23 17:34:07 +0200 | [diff] [blame] | 453 | <setProperty propertyName="logMessage"> |
| 454 | <simple>${exchangeProperty[policyName]} PDP Group removal status |
| 455 | </simple> |
| 456 | </setProperty> |
| 457 | <to uri="direct:dump-loop-log-http-response" /> |
| 458 | </split> |
| 459 | <doCatch> |
| 460 | <exception>java.lang.Exception</exception> |
| 461 | <handled> |
| 462 | <constant>false</constant> |
| 463 | </handled> |
| 464 | <setProperty propertyName="logMessage"> |
| 465 | <simple>PDP Group removal, Error reported: ${exception}</simple> |
| 466 | </setProperty> |
| 467 | <to uri="direct:dump-loop-log-http-response" /> |
| 468 | </doCatch> |
| 469 | <doFinally> |
| 470 | <to uri="direct:reset-raise-http-exception-flag" /> |
| 471 | <to |
| 472 | uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" /> |
| 473 | </doFinally> |
| 474 | </doTry> |
| 475 | </route> |
| 476 | </routes> |