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