blob: 8088c2a406bff61da0dc43a380a1035fe4cbc04f [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>
xuegao81c13442020-02-04 15:22:00 +01006 <simple>${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == true
xuegao9e01ce32020-01-27 12:10:32 +01007 </simple>
8 <to uri="direct:deploy-loop-single-blueprint" />
9 </when>
10 <when>
xuegao81c13442020-02-04 15:22:00 +010011 <simple>${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == false
xuegao9e01ce32020-01-27 12:10:32 +010012 </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]})" />
xuegao81c13442020-02-04 15:22:00 +010077 <to
78 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLogForComponent('Deploy for the micro service: ${exchangeProperty[microServicePolicy].getName()} - ${header.CamelHttpResponseCode} : ${header.CamelHttpResponseText}','INFO','DCAE',${exchangeProperty[loopObject]})" />
xuegao9e01ce32020-01-27 12:10:32 +010079 </split>
80 <doCatch>
81 <exception>java.lang.Exception</exception>
82 <handled>
83 <constant>false</constant>
84 </handled>
85 <setProperty propertyName="logMessage">
xuegaoe0a8ab92020-01-27 15:21:59 +010086 <simple>DEPLOY micro service failed
87 (MicroService name:${exchangeProperty[microServicePolicy].getName()}),
88 Dep-id:${exchangeProperty[dcaeDeploymentId]},
xuegao9e01ce32020-01-27 12:10:32 +010089 StatusUrl:${exchangeProperty[dcaeStatusUrl]})
90 </simple>
91 </setProperty>
92 <setProperty propertyName="logComponent">
93 <simple>DCAE</simple>
94 </setProperty>
95 <to uri="direct:dump-loop-log-http-response" />
96 </doCatch>
97 <doFinally>
98 <to uri="direct:reset-raise-http-exception-flag" />
99 <to
100 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
101 </doFinally>
102 </doTry>
103 </route>
xuegao9e01ce32020-01-27 12:10:32 +0100104 <route id="deploy-loop-single-blueprint">
105 <from uri="direct:deploy-loop-single-blueprint" />
sebdet74303b72019-10-08 17:53:08 +0200106 <doTry>
107 <log loggingLevel="INFO"
108 message="Deploying the loop: ${exchangeProperty[loopObject].getName()}" />
109 <to
110 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('DCAE', 'Deploying the loop')" />
111 <setBody>
112 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
113 method="getDeployPayload(${exchangeProperty[loopObject]})" />
114 </setBody>
115 <setProperty propertyName="dcaeDeploymentId">
116 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
117 method="generateDeploymentId()" />
118 </setProperty>
119 <setHeader headerName="CamelHttpMethod">
120 <constant>PUT</constant>
121 </setHeader>
122 <setHeader headerName="Content-Type">
123 <constant>application/json</constant>
124 </setHeader>
125 <setHeader headerName="X-ONAP-RequestID">
126 <simple>${exchangeProperty[X-ONAP-RequestID]}
127 </simple>
128 </setHeader>
129 <setHeader headerName="X-ONAP-InvocationID">
130 <simple>${exchangeProperty[X-ONAP-InvocationID]}
131 </simple>
132 </setHeader>
133 <setHeader headerName="X-ONAP-PartnerName">
134 <simple>${exchangeProperty[X-ONAP-PartnerName]}
135 </simple>
136 </setHeader>
137 <log loggingLevel="INFO"
138 message="Endpoint to deploy loop: {{clamp.config.dcae.deployment.url}}/dcae-deployments/${exchangeProperty[dcaeDeploymentId]}"></log>
139 <toD
140 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" />
141 <convertBodyTo type="java.lang.String" />
142 <setProperty propertyName="dcaeResponse">
143 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
144 method="convertDcaeResponse(${body})" />
145 </setProperty>
xuegao9e01ce32020-01-27 12:10:32 +0100146
147
sebdet74303b72019-10-08 17:53:08 +0200148 <setProperty propertyName="dcaeStatusUrl">
149 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
150 method="getStatusUrl(${exchangeProperty[dcaeResponse]})" />
151 </setProperty>
152 <to
153 uri="bean:org.onap.clamp.loop.LoopService?method=updateDcaeDeploymentFields(${exchangeProperty[loopObject]},${exchangeProperty[dcaeDeploymentId]},${exchangeProperty[dcaeStatusUrl]})" />
154 <doFinally>
155 <to uri="direct:reset-raise-http-exception-flag" />
156 <to
157 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
158 <setProperty propertyName="logMessage">
159 <simple>DEPLOY loop status
160 (Dep-id:${exchangeProperty[dcaeDeploymentId]},
161 StatusUrl:${exchangeProperty[dcaeStatusUrl]})
162 </simple>
163 </setProperty>
164 <setProperty propertyName="logComponent">
165 <simple>DCAE</simple>
166 </setProperty>
167 <to uri="direct:dump-loop-log-http-response" />
168 </doFinally>
169 </doTry>
170 </route>
sebdet74303b72019-10-08 17:53:08 +0200171 <route id="undeploy-loop">
172 <from uri="direct:undeploy-loop" />
xuegaoe0a8ab92020-01-27 15:21:59 +0100173 <choice>
174 <when>
xuegao81c13442020-02-04 15:22:00 +0100175 <simple>${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == true
xuegaoe0a8ab92020-01-27 15:21:59 +0100176 </simple>
177 <to uri="direct:undeploy-loop-single-blueprint" />
178 </when>
179 <when>
xuegao81c13442020-02-04 15:22:00 +0100180 <simple>${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == false
xuegaoe0a8ab92020-01-27 15:21:59 +0100181 </simple>
182 <to uri="direct:undeploy-loop-multi-blueprint" />
183 </when>
184 </choice>
185 </route>
186 <route id="undeploy-loop-multi-blueprint">
187 <from uri="direct:undeploy-loop-multi-blueprint" />
188 <doTry>
189 <log loggingLevel="INFO"
190 message="Undeploying the blueprints for loop: ${exchangeProperty[loopObject].getName()}" />
191 <to
192 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('DCAE', 'Undeploying the loop with multiple blueprints')" />
193 <split>
194 <simple>${exchangeProperty[loopObject].getMicroServicePolicies()}
195 </simple>
196 <setProperty propertyName="microServicePolicy">
197 <simple>${body}</simple>
198 </setProperty>
199 <log
200 loggingLevel="INFO"
201 message="Processing Micro Service Policy: ${exchangeProperty[microServicePolicy].getName()}" />
202 <choice>
203 <when>
204 <simple>${exchangeProperty[microServicePolicy].getDcaeDeploymentId()} != null
205 </simple>
206 <setBody>
207 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
208 method="getUndeployPayload(${exchangeProperty[microServicePolicy]})" />
209 </setBody>
210 <setHeader headerName="CamelHttpMethod">
211 <constant>DELETE</constant>
212 </setHeader>
213 <setHeader headerName="Content-Type">
214 <constant>application/json</constant>
215 </setHeader>
216 <setHeader headerName="X-ONAP-RequestID">
217 <simple>${exchangeProperty[X-ONAP-RequestID]}
218 </simple>
219 </setHeader>
220 <setHeader headerName="X-ONAP-InvocationID">
221 <simple>${exchangeProperty[X-ONAP-InvocationID]}
222 </simple>
223 </setHeader>
224 <setHeader headerName="X-ONAP-PartnerName">
225 <simple>${exchangeProperty[X-ONAP-PartnerName]}
226 </simple>
227 </setHeader>
228 <log loggingLevel="INFO"
229 message="Endpoint to undeploy loop: {{clamp.config.dcae.deployment.url}}/dcae-deployments/${exchangeProperty[microServicePolicy].getDcaeDeploymentId()}"></log>
230 <toD
231 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" />
232 <convertBodyTo type="java.lang.String" />
233 <setProperty propertyName="dcaeResponse">
234 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
235 method="convertDcaeResponse(${body})" />
236 </setProperty>
237 <setProperty propertyName="dcaeStatusUrl">
238 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
239 method="getStatusUrl(${exchangeProperty[dcaeResponse]})" />
240 </setProperty>
241 <to
242 uri="bean:org.onap.clamp.policy.microservice.MicroServicePolicyService?method=updateDcaeDeploymentFields(${exchangeProperty[microServicePolicy]},${exchangeProperty[microServicePolicy].getDcaeDeploymentId()},${exchangeProperty[dcaeStatusUrl]})" />
xuegao81c13442020-02-04 15:22:00 +0100243 <to
244 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLogForComponent('Undeploy for the micro service: ${exchangeProperty[microServicePolicy].getName()} - ${header.CamelHttpResponseCode} : ${header.CamelHttpResponseText}','INFO','DCAE',${exchangeProperty[loopObject]})" />
xuegaoe0a8ab92020-01-27 15:21:59 +0100245 </when>
246 <otherwise>
247 <log loggingLevel="WARNING"
248 message="Cannot Undeploy for the micro service: ${exchangeProperty[microServicePolicy].getName()}, the Deployment ID does not exist !" />
249 <to
xuegao81c13442020-02-04 15:22:00 +0100250 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLogForComponent('Cannot Undeploy for the micro service: ${exchangeProperty[microServicePolicy].getName()}, the Deployment ID does not exist !','WARNING','DCAE',${exchangeProperty[loopObject]})" />
xuegaoe0a8ab92020-01-27 15:21:59 +0100251 </otherwise>
252 </choice>
253 </split>
254 <doCatch>
255 <exception>java.lang.Exception</exception>
256 <handled>
257 <constant>false</constant>
258 </handled>
259 <setProperty propertyName="logMessage">
260 <simple>UNDEPLOY micro service failed
261 (MicroService name:${exchangeProperty[microServicePolicy].getName()})
262 </simple>
263 </setProperty>
264 <setProperty propertyName="logComponent">
265 <simple>DCAE</simple>
266 </setProperty>
267 <to uri="direct:dump-loop-log-http-response" />
268 </doCatch>
269 <doFinally>
270 <to uri="direct:reset-raise-http-exception-flag" />
271 <to
272 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
273 </doFinally>
274 </doTry>
275 </route>
276 <route id="undeploy-loop-single-blueprint">
277 <from uri="direct:undeploy-loop-single-blueprint" />
sebdet74303b72019-10-08 17:53:08 +0200278 <log loggingLevel="INFO"
279 message="Undeploying the loop: ${exchangeProperty[loopObject].getName()} : ${exchangeProperty[loopObject].getDcaeDeploymentId()}" />
280 <to
281 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('DCAE', 'Undeploying the loop')" />
282 <choice>
283 <when>
284 <simple>${exchangeProperty[loopObject].getDcaeDeploymentId()}
285 != null
286 </simple>
287 <doTry>
288 <setBody>
289 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
290 method="getUndeployPayload(${exchangeProperty[loopObject]})" />
291 </setBody>
292 <setHeader headerName="CamelHttpMethod">
293 <constant>DELETE</constant>
294 </setHeader>
295 <setHeader headerName="Content-Type">
296 <constant>application/json</constant>
297 </setHeader>
298
299 <setHeader headerName="X-ONAP-RequestID">
300 <simple>${exchangeProperty[X-ONAP-RequestID]}
301 </simple>
302 </setHeader>
303 <setHeader headerName="X-ONAP-InvocationID">
304 <simple>${exchangeProperty[X-ONAP-InvocationID]}
305 </simple>
306 </setHeader>
307 <setHeader headerName="X-ONAP-PartnerName">
308 <simple>${exchangeProperty[X-ONAP-PartnerName]}
309 </simple>
310 </setHeader>
311 <log loggingLevel="INFO"
312 message="Endpoint to undeploy loop: {{clamp.config.dcae.deployment.url}}/dcae-deployments/${exchangeProperty[loopObject].getDcaeDeploymentId()}"></log>
313 <toD
314 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" />
315 <convertBodyTo type="java.lang.String" />
316 <setProperty propertyName="dcaeResponse">
317 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
318 method="convertDcaeResponse(${body})" />
319 </setProperty>
320 <setProperty propertyName="dcaeStatusUrl">
321 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
322 method="getStatusUrl(${exchangeProperty[dcaeResponse]})" />
323 </setProperty>
324 <to
325 uri="bean:org.onap.clamp.loop.LoopService?method=updateDcaeDeploymentFields(${exchangeProperty[loopObject]},${exchangeProperty[loopObject].getDcaeDeploymentId()},${exchangeProperty[dcaeStatusUrl]})" />
326 <doFinally>
327 <to uri="direct:reset-raise-http-exception-flag" />
328 <to
329 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
330 <setProperty propertyName="logMessage">
331 <simple>UNDEPLOY loop status</simple>
332 </setProperty>
333 <setProperty propertyName="logComponent">
334 <simple>DCAE</simple>
335 </setProperty>
336 <to uri="direct:dump-loop-log-http-response" />
337 </doFinally>
338 </doTry>
339 </when>
340 <otherwise>
341 <log loggingLevel="WARNING"
342 message="Cannot Undeploy for the loop: ${exchangeProperty[loopObject].getName()}, the Deployment ID does not exist !" />
343 <to
344 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 +0200345 </otherwise>
346 </choice>
347 </route>
348 <route id="get-dcae-deployment-status">
349 <from uri="direct:get-dcae-deployment-status" />
350 <log loggingLevel="INFO"
xuegao81c13442020-02-04 15:22:00 +0100351 message="Getting DCAE deployment status for loop: ${exchangeProperty[loopObject].getName()} - ${exchangeProperty[dcaeComponent].getComponentName()}" />
sebdet74303b72019-10-08 17:53:08 +0200352 <to
353 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('DCAE', 'Getting Deployment status')" />
354 <doTry>
355 <setHeader headerName="CamelHttpMethod">
356 <constant>GET</constant>
357 </setHeader>
358 <setHeader headerName="X-ONAP-RequestID">
359 <simple>${exchangeProperty[X-ONAP-RequestID]}
360 </simple>
361 </setHeader>
362 <setHeader headerName="X-ONAP-InvocationID">
363 <simple>${exchangeProperty[X-ONAP-InvocationID]}
364 </simple>
365 </setHeader>
366 <setHeader headerName="X-ONAP-PartnerName">
367 <simple>${exchangeProperty[X-ONAP-PartnerName]}
368 </simple>
369 </setHeader>
370 <log loggingLevel="INFO"
xuegao81c13442020-02-04 15:22:00 +0100371 message="Endpoint to query Closed Loop status: ${exchangeProperty[getStatusUrl]}"></log>
sebdet74303b72019-10-08 17:53:08 +0200372 <toD
xuegao81c13442020-02-04 15:22:00 +0100373 uri="${exchangeProperty[getStatusUrl]}?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" />
sebdet74303b72019-10-08 17:53:08 +0200374 <doFinally>
375 <to uri="direct:reset-raise-http-exception-flag" />
376 <to
377 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
378 <setProperty propertyName="logMessage">
379 <simple>DCAE deployment status</simple>
380 </setProperty>
381 <setProperty propertyName="logComponent">
382 <simple>DCAE</simple>
383 </setProperty>
384 <to uri="direct:dump-loop-log-http-response" />
385 </doFinally>
386 </doTry>
387 </route>
388 <route id="get-dcae-blueprint-inventory">
389 <from uri="direct:get-dcae-blueprint-inventory" />
390 <log loggingLevel="INFO"
391 message="Getting DCAE blueprint id in inventory" />
392 <to
393 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('DCAE', 'Getting blueprint id in inventory')" />
394 <doTry>
395 <setHeader headerName="CamelHttpMethod">
396 <constant>GET</constant>
397 </setHeader>
398 <setHeader headerName="X-ONAP-RequestID">
399 <simple>${exchangeProperty[X-ONAP-RequestID]}
400 </simple>
401 </setHeader>
402 <setHeader headerName="X-ONAP-InvocationID">
403 <simple>${exchangeProperty[X-ONAP-InvocationID]}
404 </simple>
405 </setHeader>
406 <setHeader headerName="X-ONAP-PartnerName">
407 <simple>${exchangeProperty[X-ONAP-PartnerName]}
408 </simple>
409 </setHeader>
410 <log loggingLevel="INFO"
411 message="Endpoint to query Dcae inventory Loop status: {{clamp.config.dcae.inventory.url}}/dcae-service-types?${header[CamelHttpQuery]}"></log>
412 <toD
413 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" />
414 <convertBodyTo type="java.lang.String" />
415 <doFinally>
416 <to uri="direct:reset-raise-http-exception-flag" />
417 <to
418 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
419 </doFinally>
420 </doTry>
421
422 </route>
Vidyashree-Huawei45936562020-01-22 17:25:46 +0530423 <route id="get-all-dcae-blueprint-inventory">
424 <from uri="direct:get-all-dcae-blueprint-inventory" />
425 <log loggingLevel="INFO"
426 message="Getting all DCAE blueprint from inventory" />
427 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('DCAE', 'Getting all blueprint from inventory')" />
428 <doTry>
429 <setHeader headerName="CamelHttpMethod">
430 <constant>GET</constant>
431 </setHeader>
432 <setHeader headerName="X-ONAP-RequestID">
433 <simple>${exchangeProperty[X-ONAP-RequestID]}
434 </simple>
435 </setHeader>
436 <setHeader headerName="X-ONAP-InvocationID">
437 <simple>${exchangeProperty[X-ONAP-InvocationID]}
438 </simple>
439 </setHeader>
440 <setHeader headerName="X-ONAP-PartnerName">
441 <simple>${exchangeProperty[X-ONAP-PartnerName]}
442 </simple>
443 </setHeader>
444 <log loggingLevel="INFO"
445 message="Endpoint to query Blueprints from DCAE inventory: {{clamp.config.dcae.inventory.url}}/dcae-service-types?${header[CamelHttpQuery]}"></log>
446 <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" />
447 <convertBodyTo type="java.lang.String" />
448 <setProperty propertyName="dcaeResponseList">
449 <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
450 method="convertToDcaeInventoryResponse(${body})" />
451 </setProperty>
452 <split>
453 <simple>${exchangeProperty[dcaeResponseList]}</simple>
454 <convertBodyTo type="org.onap.clamp.clds.model.dcae.DcaeInventoryResponse" />
xuegao81c13442020-02-04 15:22:00 +0100455 <setProperty propertyName="dcaeResponse">
456 <simple>${body}</simple>
457 </setProperty>
Vidyashree-Huawei45936562020-01-22 17:25:46 +0530458 <to uri="bean:org.onap.clamp.clds.model.dcae.DcaeInventoryCache?method=addDcaeInventoryResponse(${exchangeProperty[dcaeResponse]})" />
459 </split>
460 <doFinally>
461 <to uri="direct:reset-raise-http-exception-flag" />
462 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
463 </doFinally>
464 </doTry>
465 </route>
sebdet74303b72019-10-08 17:53:08 +0200466</routes>