From: sebdet Date: Fri, 8 Oct 2021 11:52:10 +0000 (+0200) Subject: Fix delete instance in Design state X-Git-Tag: 6.1.3~6 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=b33792767bd90ce5f049d088c64812568d9a55d5;p=policy%2Fclamp.git Fix delete instance in Design state The "delete" flow should not crash when policies have not been deployed yet. + Fix DCAE logs (set to DCAe component) + Fix the STDOUT that should contain the error logs as requested by OOM team Issue-ID: POLICY-3707 Signed-off-by: sebdet Change-Id: I15951106280f4e781ee2f3140fa72a935d54f241 --- diff --git a/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml b/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml index 55e1f8ad1..82e1940b1 100644 --- a/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -560,6 +560,9 @@ + + false + @@ -597,6 +600,12 @@ message="DELETE request successfully executed for loop: ${header.loopName}"/> + + 200 + + + DELETE request SUCCESSFUL + java.lang.Exception diff --git a/runtime/src/main/resources/clds/camel/routes/dcae-flows.xml b/runtime/src/main/resources/clds/camel/routes/dcae-flows.xml index d74bd91bf..517fb09a9 100644 --- a/runtime/src/main/resources/clds/camel/routes/dcae-flows.xml +++ b/runtime/src/main/resources/clds/camel/routes/dcae-flows.xml @@ -349,9 +349,9 @@ + message="Cannot Undeploy the loop: ${exchangeProperty[loopObject].getName()}, the Deployment ID does not exist !"/> + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLogForComponent('Cannot Undeploy the loop: ${exchangeProperty[loopObject].getName()}, the Deployment ID does not exist !','WARNING','DCAE',${exchangeProperty[loopObject]})"/> @@ -404,7 +404,7 @@ + uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLogForComponent('GET DCAE deployment request failed, Error reported: ${exception.message}','ERROR','DCAE',${exchangeProperty[loopObject]})"/> diff --git a/runtime/src/main/resources/logback-default.xml b/runtime/src/main/resources/logback-default.xml index 443bc0eb1..cfa280c45 100644 --- a/runtime/src/main/resources/logback-default.xml +++ b/runtime/src/main/resources/logback-default.xml @@ -214,5 +214,6 @@ + diff --git a/runtime/ui-react/src/api/LoopActionService.js b/runtime/ui-react/src/api/LoopActionService.js index bff812a2f..18ae90eff 100644 --- a/runtime/ui-react/src/api/LoopActionService.js +++ b/runtime/ui-react/src/api/LoopActionService.js @@ -32,7 +32,7 @@ export default class LoopActionService{ }) .then(function (response) { if (response.ok) { - return response.json(); + return response; } else { return Promise.reject("Perform action failed with code:" + response.status); }