From 81c1344c018e995e4f6f906435d0faab3480e13b Mon Sep 17 00:00:00 2001 From: xuegao Date: Tue, 4 Feb 2020 15:22:00 +0100 Subject: 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 --- .../resources/clds/camel/routes/dcae-flows.xml | 26 +++--- .../resources/clds/camel/routes/loop-flows.xml | 104 +++++++++++++++------ 2 files changed, 90 insertions(+), 40 deletions(-) (limited to 'src/test/resources/clds/camel/routes') diff --git a/src/test/resources/clds/camel/routes/dcae-flows.xml b/src/test/resources/clds/camel/routes/dcae-flows.xml index 48cda7a05..8088c2a40 100644 --- a/src/test/resources/clds/camel/routes/dcae-flows.xml +++ b/src/test/resources/clds/camel/routes/dcae-flows.xml @@ -3,12 +3,12 @@ - ${exchangeProperty['loopObject'].getLoopTemplate().getBlueprint()} != null + ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == true - ${exchangeProperty['loopObject'].getLoopTemplate().getBlueprint()} == null + ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == false @@ -74,6 +74,8 @@ + java.lang.Exception @@ -170,12 +172,12 @@ - ${exchangeProperty['loopObject'].getLoopTemplate().getBlueprint()} != null + ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == true - ${exchangeProperty['loopObject'].getLoopTemplate().getBlueprint()} == null + ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == false @@ -238,12 +240,14 @@ + + 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]})" /> @@ -344,7 +348,7 @@ + message="Getting DCAE deployment status for loop: ${exchangeProperty[loopObject].getName()} - ${exchangeProperty[dcaeComponent].getComponentName()}" /> @@ -364,9 +368,9 @@ + message="Endpoint to query Closed Loop status: ${exchangeProperty[getStatusUrl]}"> + uri="${exchangeProperty[getStatusUrl]}?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.dcae.deployment.userName}}&authPassword={{clamp.config.dcae.deployment.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=30000&authenticationPreemptive=true&connectionClose=true" /> ${exchangeProperty[dcaeResponseList]} - - ${body} - + + ${body} + 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 @@ - @@ -109,37 +108,84 @@ - - ${exchangeProperty[loopObject].getComponent('DCAE')} - - - ${exchangeProperty[loopObject].getDcaeDeploymentStatusUrl()} - != null - - - false - - + - ${header.CamelHttpResponseCode} == 200 - - - + ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == true + + + ${exchangeProperty[loopObject].getComponent('DCAE')} + + + ${exchangeProperty[loopObject].getDcaeDeploymentStatusUrl()} != null + + + ${exchangeProperty[loopObject].getDcaeDeploymentStatusUrl()} + + + false + + + + ${header.CamelHttpResponseCode} == 200 + + + + + + + + ${exchangeProperty[dcaeComponent].computeState(*)} + + + - - - - ${exchangeProperty[dcaeComponent].computeState(*)} - - - - - - + + ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == false + + + ${exchangeProperty[loopObject].getMicroServicePolicies()} + + + ${body} + + + ${exchangeProperty[loopObject].getComponent('DCAE_' + ${exchangeProperty[microServicePolicy].getName())} + + + ${exchangeProperty[microServicePolicy].getDcaeDeploymentStatusUrl()} != null + + + ${exchangeProperty[microServicePolicy].getDcaeDeploymentStatusUrl()} + + + false + + + + ${header.CamelHttpResponseCode} == 200 + + + + + + + + ${exchangeProperty[dcaeComponent].computeState(*)} + + + + + > + + +