From 39d82def1e54d6584f41ab9f94d30c2057858c32 Mon Sep 17 00:00:00 2001 From: xg353y Date: Fri, 26 Apr 2019 13:26:25 +0200 Subject: Fix the get loop state logic Fix the logic to get the loop state and update the CL deploy/undeploy flow accordingly Issue-ID: CLAMP-362 Change-Id: I34f83bd241b1029417453908bf932c0b69f9f5b2 Signed-off-by: xg353y --- .../resources/clds/camel/rest/clamp-api-v2.xml | 114 ++++++++++- .../resources/clds/camel/routes/flexible-flow.xml | 217 +++++++++++++++++++++ 2 files changed, 329 insertions(+), 2 deletions(-) (limited to 'src/main/resources/clds') diff --git a/src/main/resources/clds/camel/rest/clamp-api-v2.xml b/src/main/resources/clds/camel/rest/clamp-api-v2.xml index 5c5f122cd..2640d6bd6 100644 --- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -206,7 +206,40 @@ + uri="direct:load-loop" /> + + ${exchangeProperty[loopObject].getOperationalPolicies()} + + + ${body} + + + + + + + + + ${exchangeProperty[policyStatus]} == 'SUBMITTED' and + ${exchangeProperty[dcaeStatus]} == 'NOT_DEPLOYED' + + + + + + + + @@ -216,6 +249,11 @@ + + @@ -234,7 +272,24 @@ + uri="direct:load-loop" /> + + + + ${exchangeProperty[dcaeStatus]} == 'DEPLOYED' + + + + + + + + @@ -244,6 +299,11 @@ + + @@ -526,5 +586,55 @@ + + + + + + + + + + + false + + + + + + + + + + + java.lang.Exception + + false + + + + + + + + diff --git a/src/main/resources/clds/camel/routes/flexible-flow.xml b/src/main/resources/clds/camel/routes/flexible-flow.xml index 75341de93..681380085 100644 --- a/src/main/resources/clds/camel/routes/flexible-flow.xml +++ b/src/main/resources/clds/camel/routes/flexible-flow.xml @@ -490,7 +490,224 @@ + + + + + + ${exchangeProperty[loopObject].getOperationalPolicies()} + + + ${body} + + + + + + + + + PUT + + + application/json + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + Deploy closed loop status + + + + + + + + + + + + + {\"serviceTypeId\": \"${exchangeProperty[loopObject].getDcaeBlueprintId()}\"} + + + + DELETE + + + application/json + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + Undeploy closed loop status + + + + + + + + + + + + null + + + GET + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + Query closed loop from Policy status + + + + + + + + + + + + + + + ${exchangeProperty[loopObject].getDcaeDeploymentStatusUrl()} == null + + + + + + + + + + + GET + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + Query closed loop from DCAE status + + + + + + + + + + + -- cgit 1.2.3-korg