diff options
author | xuegao <xg353y@intl.att.com> | 2020-02-04 15:22:00 +0100 |
---|---|---|
committer | xuegao <xg353y@intl.att.com> | 2020-02-10 09:52:53 +0100 |
commit | 81c1344c018e995e4f6f906435d0faab3480e13b (patch) | |
tree | 15e875974d3dd2e4a9b7aa20a2e340176d8506d1 /src/main/resources/clds/camel/routes/loop-flows.xml | |
parent | 8d91398da6162c19643f3f7cae83327dd4e81263 (diff) |
Update get Dcae Status flow
Update the flow to get Dcae Status, supporting multiple blue print.
Issue-ID: CLAMP-590
Change-Id: I6a05a40d4879082413d3ed83159467ea616c5d37
Signed-off-by: xuegao <xg353y@intl.att.com>
Diffstat (limited to 'src/main/resources/clds/camel/routes/loop-flows.xml')
-rw-r--r-- | src/main/resources/clds/camel/routes/loop-flows.xml | 103 |
1 files changed, 75 insertions, 28 deletions
diff --git a/src/main/resources/clds/camel/routes/loop-flows.xml b/src/main/resources/clds/camel/routes/loop-flows.xml index 57d32f0fe..c4e9fee6d 100644 --- a/src/main/resources/clds/camel/routes/loop-flows.xml +++ b/src/main/resources/clds/camel/routes/loop-flows.xml @@ -108,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" |