summaryrefslogtreecommitdiffstats
path: root/src/test/resources/clds/camel/routes/loop-flows.xml
diff options
context:
space:
mode:
authorSébastien Determe <sebastien.determe@intl.att.com>2020-02-10 09:52:42 +0000
committerGerrit Code Review <gerrit@onap.org>2020-02-10 09:52:42 +0000
commitb398c32d092ca7ca14fa37d22fae6cbc1710e66e (patch)
tree06f46938dfc31e6c891b52b0658d1c091354434a /src/test/resources/clds/camel/routes/loop-flows.xml
parent899c22fccf12f50a877988c62e30d5e2c7fb7e3c (diff)
parent81c1344c018e995e4f6f906435d0faab3480e13b (diff)
Merge "Update get Dcae Status flow"
Diffstat (limited to 'src/test/resources/clds/camel/routes/loop-flows.xml')
-rw-r--r--src/test/resources/clds/camel/routes/loop-flows.xml104
1 files changed, 75 insertions, 29 deletions
diff --git a/src/test/resources/clds/camel/routes/loop-flows.xml b/src/test/resources/clds/camel/routes/loop-flows.xml
index 036e8efc..c4e9fee6 100644
--- a/src/test/resources/clds/camel/routes/loop-flows.xml
+++ b/src/test/resources/clds/camel/routes/loop-flows.xml
@@ -17,7 +17,6 @@
<stop />
</when>
</route>
-
<route id="update-policy-status-for-loop">
<from uri="direct:update-policy-status-for-loop" />
<setProperty propertyName="policyComponent">
@@ -109,37 +108,84 @@
<from uri="direct:update-dcae-status-for-loop" />
<log loggingLevel="INFO"
message="Updating DCAE status for loop: ${exchangeProperty[loopObject].getName()}" />
- <setProperty propertyName="dcaeComponent">
- <simple>${exchangeProperty[loopObject].getComponent('DCAE')}</simple>
- </setProperty>
- <when>
- <simple>${exchangeProperty[loopObject].getDcaeDeploymentStatusUrl()}
- != null
- </simple>
- <setProperty propertyName="raiseHttpExceptionFlag">
- <simple resultType="java.lang.Boolean">false</simple>
- </setProperty>
- <to uri="direct:get-dcae-deployment-status" />
+ <choice>
<when>
- <simple> ${header.CamelHttpResponseCode} == 200 </simple>
- <convertBodyTo type="java.lang.String" />
- <setProperty propertyName="dcaeResponse">
- <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
- method="convertDcaeResponse(${body})" />
+ <simple>${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == true
+ </simple>
+ <setProperty propertyName="dcaeComponent">
+ <simple>${exchangeProperty[loopObject].getComponent('DCAE')}</simple>
+ </setProperty>
+ <when>
+ <simple>${exchangeProperty[loopObject].getDcaeDeploymentStatusUrl()} != null
+ </simple>
+ <setProperty propertyName="getStatusUrl">
+ <simple>${exchangeProperty[loopObject].getDcaeDeploymentStatusUrl()}</simple>
+ </setProperty>
+ <setProperty propertyName="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">false</simple>
+ </setProperty>
+ <to uri="direct:get-dcae-deployment-status" />
+ <when>
+ <simple> ${header.CamelHttpResponseCode} == 200 </simple>
+ <convertBodyTo type="java.lang.String" />
+ <setProperty propertyName="dcaeResponse">
+ <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
+ method="convertDcaeResponse(${body})" />
+ </setProperty>
+ </when>
+ </when>
+ <setProperty propertyName="dcaeState">
+ <simple> ${exchangeProperty[dcaeComponent].computeState(*)}
+ </simple>
</setProperty>
+ <log loggingLevel="INFO"
+ message="DCAE state set to: ${exchangeProperty[dcaeState].getStateName()} - DCAE message: ${exchangeProperty[dcaeResponse].getError()}" />
+ <to
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLogForComponent('DCAE state set to: ${exchangeProperty[dcaeState].getStateName()} - message: ${exchangeProperty[dcaeResponse].getError()}','INFO','DCAE',${exchangeProperty[loopObject]})" />
</when>
- </when>
-
- <setProperty propertyName="dcaeState">
- <simple> ${exchangeProperty[dcaeComponent].computeState(*)}
- </simple>
- </setProperty>
- <log loggingLevel="INFO"
- message="DCAE state set to: ${exchangeProperty[dcaeState].getStateName()} - DCAE message: ${exchangeProperty[dcaeResponse].getError()}" />
- <to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLogForComponent('DCAE state set to: ${exchangeProperty[dcaeState].getStateName()} - message: ${exchangeProperty[dcaeResponse].getError()}','INFO','DCAE',${exchangeProperty[loopObject]})" />
-
- </route>
+ <when>
+ <simple>${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == false
+ </simple>
+ <split>
+ <simple>${exchangeProperty[loopObject].getMicroServicePolicies()}
+ </simple>
+ <setProperty propertyName="microServicePolicy">
+ <simple>${body}</simple>
+ </setProperty>
+ <setProperty propertyName="dcaeComponent">
+ <simple>${exchangeProperty[loopObject].getComponent('DCAE_' + ${exchangeProperty[microServicePolicy].getName())}</simple>
+ </setProperty>
+ <when>
+ <simple>${exchangeProperty[microServicePolicy].getDcaeDeploymentStatusUrl()} != null
+ </simple>
+ <setProperty propertyName="getStatusUrl">
+ <simple>${exchangeProperty[microServicePolicy].getDcaeDeploymentStatusUrl()}</simple>
+ </setProperty>
+ <setProperty propertyName="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">false</simple>
+ </setProperty>
+ <to uri="direct:get-dcae-deployment-status" />
+ <when>
+ <simple> ${header.CamelHttpResponseCode} == 200 </simple>
+ <convertBodyTo type="java.lang.String" />
+ <setProperty propertyName="dcaeResponse">
+ <method ref="org.onap.clamp.loop.components.external.DcaeComponent"
+ method="convertDcaeResponse(${body})" />
+ </setProperty>
+ </when>
+ </when>
+ <setProperty propertyName="dcaeState">
+ <simple> ${exchangeProperty[dcaeComponent].computeState(*)}
+ </simple>
+ </setProperty>
+ <log loggingLevel="INFO"
+ message="DCAE state set to: ${exchangeProperty[dcaeState].getStateName()} - DCAE message: ${exchangeProperty[dcaeResponse].getError()}" />
+ <to
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLogForComponent('DCAE state set to: ${exchangeProperty[dcaeState].getStateName()} - message: ${exchangeProperty[dcaeResponse].getError()}','INFO','DCAE',${exchangeProperty[microServicePolicy]})" />
+ </split>>
+ </when>
+ </choice>
+ </route>
<route id="direct:update-loop-state">
<from uri="direct:update-loop-state" />
<log loggingLevel="INFO"