blob: 48cda7a05fff66989840ca5ea8996e9b51f2b617 [file] [log] [blame]
sebdet74303b72019-10-08 17:53:08 +02001<routes xmlns="http://camel.apache.org/schema/spring">
2 <route id="deploy-loop">
3 <from uri="direct:deploy-loop" />
xuegao9e01ce32020-01-27 12:10:32 +01004 <choice>
5 <when>
6 <simple>${exchangeProperty['loopObject'].getLoopTemplate().getBlueprint()} != null
7 </simple>
8 <to uri="direct:deploy-loop-single-blueprint" />
9 </when>
10 <when>
11 <simple>${exchangeProperty['loopObject'].getLoopTemplate().getBlueprint()} == null
12 </simple>
13 <to uri="direct:deploy-loop-multi-blueprint" />
14 </when>
15 </choice>
16 </route>
17 <route id="deploy-loop-multi-blueprint">
18 <from uri="direct:deploy-loop-multi-blueprint" />
19 <doTry>
20 <log loggingLevel="INFO"
21 message="Deploying the blueprints for loop: ${exchangeProperty[loopObject].getName()}" />
22 <to
23 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('DCAE', 'Deploying the loop with multiple blueprints')" />
24 <split>
25 <simple>${exchangeProperty[loopObject].getMicroServicePolicies()}
26 </simple>
27 <setProperty propertyName="microServicePolicy">
28 <simple>${body}</simple>
29 </setProperty>
30 <log
31 loggingLevel="INFO"
32 message="Processing Micro Service Policy: ${exchangeProperty[microServicePolicy].getName()}" />
33 <setProperty propertyName="raiseHttpExceptionFlag">
34 <simple resultType="java.lang.Boolean">false</simple>
35 </setProperty>
36 <setBody>
37 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
38 method="getDeployPayload(${exchangeProperty[loopObject]},${exchangeProperty[microServicePolicy].getName()})" />
39 </setBody>
40 <setProperty propertyName="dcaeDeploymentId">
41 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
42 method="generateDeploymentId()" />
43 </setProperty>
44 <setHeader headerName="CamelHttpMethod">
45 <constant>PUT</constant>
46 </setHeader>
47 <setHeader headerName="Content-Type">
48 <constant>application/json</constant>
49 </setHeader>
50 <setHeader headerName="X-ONAP-RequestID">
51 <simple>${exchangeProperty[X-ONAP-RequestID]}
52 </simple>
53 </setHeader>
54 <setHeader headerName="X-ONAP-InvocationID">
55 <simple>${exchangeProperty[X-ONAP-InvocationID]}
56 </simple>
57 </setHeader>
58 <setHeader headerName="X-ONAP-PartnerName">
59 <simple>${exchangeProperty[X-ONAP-PartnerName]}
60 </simple>
61 </setHeader>
62 <log loggingLevel="INFO"
63 message="Endpoint to deploy loop: {{clamp.config.dcae.deployment.url}}/dcae-deployments/${exchangeProperty[dcaeDeploymentId]}"></log>
64 <toD
65 uri="{{clamp.config.dcae.deployment.url}}/dcae-deployments/${exchangeProperty[dcaeDeploymentId]}?bridgeEndpoint=true&amp;useSystemProperties=true&amp;mapHttpMessageHeaders=false&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;authUsername={{clamp.config.dcae.deployment.userName}}&amp;authPassword={{clamp.config.dcae.deployment.password}}&amp;connectionTimeToLive=5000&amp;httpClient.connectTimeout=10000&amp;httpClient.socketTimeout=300000&amp;authenticationPreemptive=true&amp;connectionClose=true" />
66 <convertBodyTo type="java.lang.String" />
67 <setProperty propertyName="dcaeResponse">
68 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
69 method="convertDcaeResponse(${body})" />
70 </setProperty>
71 <setProperty propertyName="dcaeStatusUrl">
72 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
73 method="getStatusUrl(${exchangeProperty[dcaeResponse]})" />
74 </setProperty>
75 <to
76 uri="bean:org.onap.clamp.policy.microservice.MicroServicePolicyService?method=updateDcaeDeploymentFields(${exchangeProperty[microServicePolicy]},${exchangeProperty[dcaeDeploymentId]},${exchangeProperty[dcaeStatusUrl]})" />
77 </split>
78 <doCatch>
79 <exception>java.lang.Exception</exception>
80 <handled>
81 <constant>false</constant>
82 </handled>
83 <setProperty propertyName="logMessage">
xuegaoe0a8ab92020-01-27 15:21:59 +010084 <simple>DEPLOY micro service failed
85 (MicroService name:${exchangeProperty[microServicePolicy].getName()}),
86 Dep-id:${exchangeProperty[dcaeDeploymentId]},
xuegao9e01ce32020-01-27 12:10:32 +010087 StatusUrl:${exchangeProperty[dcaeStatusUrl]})
88 </simple>
89 </setProperty>
90 <setProperty propertyName="logComponent">
91 <simple>DCAE</simple>
92 </setProperty>
93 <to uri="direct:dump-loop-log-http-response" />
94 </doCatch>
95 <doFinally>
96 <to uri="direct:reset-raise-http-exception-flag" />
97 <to
98 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
99 </doFinally>
100 </doTry>
101 </route>
xuegao9e01ce32020-01-27 12:10:32 +0100102 <route id="deploy-loop-single-blueprint">
103 <from uri="direct:deploy-loop-single-blueprint" />
sebdet74303b72019-10-08 17:53:08 +0200104 <doTry>
105 <log loggingLevel="INFO"
106 message="Deploying the loop: ${exchangeProperty[loopObject].getName()}" />
107 <to
108 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('DCAE', 'Deploying the loop')" />
109 <setBody>
110 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
111 method="getDeployPayload(${exchangeProperty[loopObject]})" />
112 </setBody>
113 <setProperty propertyName="dcaeDeploymentId">
114 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
115 method="generateDeploymentId()" />
116 </setProperty>
117 <setHeader headerName="CamelHttpMethod">
118 <constant>PUT</constant>
119 </setHeader>
120 <setHeader headerName="Content-Type">
121 <constant>application/json</constant>
122 </setHeader>
123 <setHeader headerName="X-ONAP-RequestID">
124 <simple>${exchangeProperty[X-ONAP-RequestID]}
125 </simple>
126 </setHeader>
127 <setHeader headerName="X-ONAP-InvocationID">
128 <simple>${exchangeProperty[X-ONAP-InvocationID]}
129 </simple>
130 </setHeader>
131 <setHeader headerName="X-ONAP-PartnerName">
132 <simple>${exchangeProperty[X-ONAP-PartnerName]}
133 </simple>
134 </setHeader>
135 <log loggingLevel="INFO"
136 message="Endpoint to deploy loop: {{clamp.config.dcae.deployment.url}}/dcae-deployments/${exchangeProperty[dcaeDeploymentId]}"></log>
137 <toD
138 uri="{{clamp.config.dcae.deployment.url}}/dcae-deployments/${exchangeProperty[dcaeDeploymentId]}?bridgeEndpoint=true&amp;useSystemProperties=true&amp;mapHttpMessageHeaders=false&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;authUsername={{clamp.config.dcae.deployment.userName}}&amp;authPassword={{clamp.config.dcae.deployment.password}}&amp;connectionTimeToLive=5000&amp;httpClient.connectTimeout=10000&amp;httpClient.socketTimeout=300000&amp;authenticationPreemptive=true&amp;connectionClose=true" />
139 <convertBodyTo type="java.lang.String" />
140 <setProperty propertyName="dcaeResponse">
141 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
142 method="convertDcaeResponse(${body})" />
143 </setProperty>
xuegao9e01ce32020-01-27 12:10:32 +0100144
145
sebdet74303b72019-10-08 17:53:08 +0200146 <setProperty propertyName="dcaeStatusUrl">
147 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
148 method="getStatusUrl(${exchangeProperty[dcaeResponse]})" />
149 </setProperty>
150 <to
151 uri="bean:org.onap.clamp.loop.LoopService?method=updateDcaeDeploymentFields(${exchangeProperty[loopObject]},${exchangeProperty[dcaeDeploymentId]},${exchangeProperty[dcaeStatusUrl]})" />
152 <doFinally>
153 <to uri="direct:reset-raise-http-exception-flag" />
154 <to
155 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
156 <setProperty propertyName="logMessage">
157 <simple>DEPLOY loop status
158 (Dep-id:${exchangeProperty[dcaeDeploymentId]},
159 StatusUrl:${exchangeProperty[dcaeStatusUrl]})
160 </simple>
161 </setProperty>
162 <setProperty propertyName="logComponent">
163 <simple>DCAE</simple>
164 </setProperty>
165 <to uri="direct:dump-loop-log-http-response" />
166 </doFinally>
167 </doTry>
168 </route>
sebdet74303b72019-10-08 17:53:08 +0200169 <route id="undeploy-loop">
170 <from uri="direct:undeploy-loop" />
xuegaoe0a8ab92020-01-27 15:21:59 +0100171 <choice>
172 <when>
173 <simple>${exchangeProperty['loopObject'].getLoopTemplate().getBlueprint()} != null
174 </simple>
175 <to uri="direct:undeploy-loop-single-blueprint" />
176 </when>
177 <when>
178 <simple>${exchangeProperty['loopObject'].getLoopTemplate().getBlueprint()} == null
179 </simple>
180 <to uri="direct:undeploy-loop-multi-blueprint" />
181 </when>
182 </choice>
183 </route>
184 <route id="undeploy-loop-multi-blueprint">
185 <from uri="direct:undeploy-loop-multi-blueprint" />
186 <doTry>
187 <log loggingLevel="INFO"
188 message="Undeploying the blueprints for loop: ${exchangeProperty[loopObject].getName()}" />
189 <to
190 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('DCAE', 'Undeploying the loop with multiple blueprints')" />
191 <split>
192 <simple>${exchangeProperty[loopObject].getMicroServicePolicies()}
193 </simple>
194 <setProperty propertyName="microServicePolicy">
195 <simple>${body}</simple>
196 </setProperty>
197 <log
198 loggingLevel="INFO"
199 message="Processing Micro Service Policy: ${exchangeProperty[microServicePolicy].getName()}" />
200 <choice>
201 <when>
202 <simple>${exchangeProperty[microServicePolicy].getDcaeDeploymentId()} != null
203 </simple>
204 <setBody>
205 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
206 method="getUndeployPayload(${exchangeProperty[microServicePolicy]})" />
207 </setBody>
208 <setHeader headerName="CamelHttpMethod">
209 <constant>DELETE</constant>
210 </setHeader>
211 <setHeader headerName="Content-Type">
212 <constant>application/json</constant>
213 </setHeader>
214 <setHeader headerName="X-ONAP-RequestID">
215 <simple>${exchangeProperty[X-ONAP-RequestID]}
216 </simple>
217 </setHeader>
218 <setHeader headerName="X-ONAP-InvocationID">
219 <simple>${exchangeProperty[X-ONAP-InvocationID]}
220 </simple>
221 </setHeader>
222 <setHeader headerName="X-ONAP-PartnerName">
223 <simple>${exchangeProperty[X-ONAP-PartnerName]}
224 </simple>
225 </setHeader>
226 <log loggingLevel="INFO"
227 message="Endpoint to undeploy loop: {{clamp.config.dcae.deployment.url}}/dcae-deployments/${exchangeProperty[microServicePolicy].getDcaeDeploymentId()}"></log>
228 <toD
229 uri="{{clamp.config.dcae.deployment.url}}/dcae-deployments/${exchangeProperty[microServicePolicy].getDcaeDeploymentId()}?bridgeEndpoint=true&amp;useSystemProperties=true&amp;mapHttpMessageHeaders=false&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;authUsername={{clamp.config.dcae.deployment.userName}}&amp;authPassword={{clamp.config.dcae.deployment.password}}&amp;connectionTimeToLive=5000&amp;httpClient.connectTimeout=10000&amp;httpClient.socketTimeout=300000&amp;authenticationPreemptive=true&amp;connectionClose=true" />
230 <convertBodyTo type="java.lang.String" />
231 <setProperty propertyName="dcaeResponse">
232 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
233 method="convertDcaeResponse(${body})" />
234 </setProperty>
235 <setProperty propertyName="dcaeStatusUrl">
236 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
237 method="getStatusUrl(${exchangeProperty[dcaeResponse]})" />
238 </setProperty>
239 <to
240 uri="bean:org.onap.clamp.policy.microservice.MicroServicePolicyService?method=updateDcaeDeploymentFields(${exchangeProperty[microServicePolicy]},${exchangeProperty[microServicePolicy].getDcaeDeploymentId()},${exchangeProperty[dcaeStatusUrl]})" />
241 </when>
242 <otherwise>
243 <log loggingLevel="WARNING"
244 message="Cannot Undeploy for the micro service: ${exchangeProperty[microServicePolicy].getName()}, the Deployment ID does not exist !" />
245 <to
246 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Cannot Undeploy for the micro service: ${exchangeProperty[microServicePolicy].getName()}, the Deployment ID does not exist !','WARNING',${exchangeProperty[loopObject]})" />
247 </otherwise>
248 </choice>
249 </split>
250 <doCatch>
251 <exception>java.lang.Exception</exception>
252 <handled>
253 <constant>false</constant>
254 </handled>
255 <setProperty propertyName="logMessage">
256 <simple>UNDEPLOY micro service failed
257 (MicroService name:${exchangeProperty[microServicePolicy].getName()})
258 </simple>
259 </setProperty>
260 <setProperty propertyName="logComponent">
261 <simple>DCAE</simple>
262 </setProperty>
263 <to uri="direct:dump-loop-log-http-response" />
264 </doCatch>
265 <doFinally>
266 <to uri="direct:reset-raise-http-exception-flag" />
267 <to
268 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
269 </doFinally>
270 </doTry>
271 </route>
272 <route id="undeploy-loop-single-blueprint">
273 <from uri="direct:undeploy-loop-single-blueprint" />
sebdet74303b72019-10-08 17:53:08 +0200274 <log loggingLevel="INFO"
275 message="Undeploying the loop: ${exchangeProperty[loopObject].getName()} : ${exchangeProperty[loopObject].getDcaeDeploymentId()}" />
276 <to
277 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('DCAE', 'Undeploying the loop')" />
278 <choice>
279 <when>
280 <simple>${exchangeProperty[loopObject].getDcaeDeploymentId()}
281 != null
282 </simple>
283 <doTry>
284 <setBody>
285 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
286 method="getUndeployPayload(${exchangeProperty[loopObject]})" />
287 </setBody>
288 <setHeader headerName="CamelHttpMethod">
289 <constant>DELETE</constant>
290 </setHeader>
291 <setHeader headerName="Content-Type">
292 <constant>application/json</constant>
293 </setHeader>
294
295 <setHeader headerName="X-ONAP-RequestID">
296 <simple>${exchangeProperty[X-ONAP-RequestID]}
297 </simple>
298 </setHeader>
299 <setHeader headerName="X-ONAP-InvocationID">
300 <simple>${exchangeProperty[X-ONAP-InvocationID]}
301 </simple>
302 </setHeader>
303 <setHeader headerName="X-ONAP-PartnerName">
304 <simple>${exchangeProperty[X-ONAP-PartnerName]}
305 </simple>
306 </setHeader>
307 <log loggingLevel="INFO"
308 message="Endpoint to undeploy loop: {{clamp.config.dcae.deployment.url}}/dcae-deployments/${exchangeProperty[loopObject].getDcaeDeploymentId()}"></log>
309 <toD
310 uri="{{clamp.config.dcae.deployment.url}}/dcae-deployments/${exchangeProperty[loopObject].getDcaeDeploymentId()}?bridgeEndpoint=true&amp;useSystemProperties=true&amp;mapHttpMessageHeaders=false&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;authUsername={{clamp.config.dcae.deployment.userName}}&amp;authPassword={{clamp.config.dcae.deployment.password}}&amp;connectionTimeToLive=5000&amp;httpClient.connectTimeout=10000&amp;httpClient.socketTimeout=300000&amp;authenticationPreemptive=true&amp;connectionClose=true" />
311 <convertBodyTo type="java.lang.String" />
312 <setProperty propertyName="dcaeResponse">
313 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
314 method="convertDcaeResponse(${body})" />
315 </setProperty>
316 <setProperty propertyName="dcaeStatusUrl">
317 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
318 method="getStatusUrl(${exchangeProperty[dcaeResponse]})" />
319 </setProperty>
320 <to
321 uri="bean:org.onap.clamp.loop.LoopService?method=updateDcaeDeploymentFields(${exchangeProperty[loopObject]},${exchangeProperty[loopObject].getDcaeDeploymentId()},${exchangeProperty[dcaeStatusUrl]})" />
322 <doFinally>
323 <to uri="direct:reset-raise-http-exception-flag" />
324 <to
325 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
326 <setProperty propertyName="logMessage">
327 <simple>UNDEPLOY loop status</simple>
328 </setProperty>
329 <setProperty propertyName="logComponent">
330 <simple>DCAE</simple>
331 </setProperty>
332 <to uri="direct:dump-loop-log-http-response" />
333 </doFinally>
334 </doTry>
335 </when>
336 <otherwise>
337 <log loggingLevel="WARNING"
338 message="Cannot Undeploy for the loop: ${exchangeProperty[loopObject].getName()}, the Deployment ID does not exist !" />
339 <to
340 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Cannot Undeploy for the loop: ${exchangeProperty[loopObject].getName()}, the Deployment ID does not exist !','WARNING',${exchangeProperty[loopObject]})" />
sebdet74303b72019-10-08 17:53:08 +0200341 </otherwise>
342 </choice>
343 </route>
344 <route id="get-dcae-deployment-status">
345 <from uri="direct:get-dcae-deployment-status" />
346 <log loggingLevel="INFO"
347 message="Getting DCAE deployment status for loop: ${exchangeProperty[loopObject].getName()}" />
348 <to
349 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('DCAE', 'Getting Deployment status')" />
350 <doTry>
351 <setHeader headerName="CamelHttpMethod">
352 <constant>GET</constant>
353 </setHeader>
354 <setHeader headerName="X-ONAP-RequestID">
355 <simple>${exchangeProperty[X-ONAP-RequestID]}
356 </simple>
357 </setHeader>
358 <setHeader headerName="X-ONAP-InvocationID">
359 <simple>${exchangeProperty[X-ONAP-InvocationID]}
360 </simple>
361 </setHeader>
362 <setHeader headerName="X-ONAP-PartnerName">
363 <simple>${exchangeProperty[X-ONAP-PartnerName]}
364 </simple>
365 </setHeader>
366 <log loggingLevel="INFO"
367 message="Endpoint to query Closed Loop status: ${exchangeProperty[loopObject].getDcaeDeploymentStatusUrl()}"></log>
368 <toD
369 uri="${exchangeProperty[loopObject].getDcaeDeploymentStatusUrl()}?bridgeEndpoint=true&amp;useSystemProperties=true&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;authMethod=Basic&amp;authUsername={{clamp.config.dcae.deployment.userName}}&amp;authPassword={{clamp.config.dcae.deployment.password}}&amp;connectionTimeToLive=5000&amp;httpClient.connectTimeout=10000&amp;httpClient.socketTimeout=30000&amp;authenticationPreemptive=true&amp;connectionClose=true" />
370 <doFinally>
371 <to uri="direct:reset-raise-http-exception-flag" />
372 <to
373 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
374 <setProperty propertyName="logMessage">
375 <simple>DCAE deployment status</simple>
376 </setProperty>
377 <setProperty propertyName="logComponent">
378 <simple>DCAE</simple>
379 </setProperty>
380 <to uri="direct:dump-loop-log-http-response" />
381 </doFinally>
382 </doTry>
383 </route>
384 <route id="get-dcae-blueprint-inventory">
385 <from uri="direct:get-dcae-blueprint-inventory" />
386 <log loggingLevel="INFO"
387 message="Getting DCAE blueprint id in inventory" />
388 <to
389 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('DCAE', 'Getting blueprint id in inventory')" />
390 <doTry>
391 <setHeader headerName="CamelHttpMethod">
392 <constant>GET</constant>
393 </setHeader>
394 <setHeader headerName="X-ONAP-RequestID">
395 <simple>${exchangeProperty[X-ONAP-RequestID]}
396 </simple>
397 </setHeader>
398 <setHeader headerName="X-ONAP-InvocationID">
399 <simple>${exchangeProperty[X-ONAP-InvocationID]}
400 </simple>
401 </setHeader>
402 <setHeader headerName="X-ONAP-PartnerName">
403 <simple>${exchangeProperty[X-ONAP-PartnerName]}
404 </simple>
405 </setHeader>
406 <log loggingLevel="INFO"
407 message="Endpoint to query Dcae inventory Loop status: {{clamp.config.dcae.inventory.url}}/dcae-service-types?${header[CamelHttpQuery]}"></log>
408 <toD
409 uri="{{clamp.config.dcae.inventory.url}}/dcae-service-types?asdcResourceId=${exchangeProperty[blueprintResourceId]}&amp;asdcServiceId=${exchangeProperty[blueprintServiceId]}&amp;typeName=${exchangeProperty[blueprintName]}&amp;bridgeEndpoint=true&amp;useSystemProperties=true&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;authMethod=Basic&amp;authUsername={{clamp.config.dcae.deployment.userName}}&amp;authPassword={{clamp.config.dcae.deployment.password}}&amp;connectionTimeToLive=5000&amp;httpClient.connectTimeout=10000&amp;httpClient.socketTimeout=30000&amp;authenticationPreemptive=true&amp;connectionClose=true" />
410 <convertBodyTo type="java.lang.String" />
411 <doFinally>
412 <to uri="direct:reset-raise-http-exception-flag" />
413 <to
414 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
415 </doFinally>
416 </doTry>
417
418 </route>
Vidyashree-Huawei45936562020-01-22 17:25:46 +0530419 <route id="get-all-dcae-blueprint-inventory">
420 <from uri="direct:get-all-dcae-blueprint-inventory" />
421 <log loggingLevel="INFO"
422 message="Getting all DCAE blueprint from inventory" />
423 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('DCAE', 'Getting all blueprint from inventory')" />
424 <doTry>
425 <setHeader headerName="CamelHttpMethod">
426 <constant>GET</constant>
427 </setHeader>
428 <setHeader headerName="X-ONAP-RequestID">
429 <simple>${exchangeProperty[X-ONAP-RequestID]}
430 </simple>
431 </setHeader>
432 <setHeader headerName="X-ONAP-InvocationID">
433 <simple>${exchangeProperty[X-ONAP-InvocationID]}
434 </simple>
435 </setHeader>
436 <setHeader headerName="X-ONAP-PartnerName">
437 <simple>${exchangeProperty[X-ONAP-PartnerName]}
438 </simple>
439 </setHeader>
440 <log loggingLevel="INFO"
441 message="Endpoint to query Blueprints from DCAE inventory: {{clamp.config.dcae.inventory.url}}/dcae-service-types?${header[CamelHttpQuery]}"></log>
442 <toD uri="{{clamp.config.dcae.inventory.url}}/dcae-service-types;bridgeEndpoint=true&amp;useSystemProperties=true&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;authMethod=Basic&amp;authUsername={{clamp.config.dcae.deployment.userName}}&amp;authPassword={{clamp.config.dcae.deployment.password}}&amp;connectionTimeToLive=5000&amp;httpClient.connectTimeout=10000&amp;httpClient.socketTimeout=30000&amp;authenticationPreemptive=true&amp;connectionClose=true" />
443 <convertBodyTo type="java.lang.String" />
444 <setProperty propertyName="dcaeResponseList">
445 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
446 method="convertToDcaeInventoryResponse(${body})" />
447 </setProperty>
448 <split>
449 <simple>${exchangeProperty[dcaeResponseList]}</simple>
450 <convertBodyTo type="org.onap.clamp.clds.model.dcae.DcaeInventoryResponse" />
451 <setProperty propertyName="dcaeResponse">
452 <simple>${body}</simple>
453 </setProperty>
454 <to uri="bean:org.onap.clamp.clds.model.dcae.DcaeInventoryCache?method=addDcaeInventoryResponse(${exchangeProperty[dcaeResponse]})" />
455 </split>
456 <doFinally>
457 <to uri="direct:reset-raise-http-exception-flag" />
458 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
459 </doFinally>
460 </doTry>
461 </route>
sebdet74303b72019-10-08 17:53:08 +0200462</routes>