diff options
Diffstat (limited to 'src/test/resources/clds/camel/routes/loop-flows.xml')
-rw-r--r-- | src/test/resources/clds/camel/routes/loop-flows.xml | 104 |
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 036e8efc8..c4e9fee6d 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" |