From 8b4027e3e359bba21014dd138da2545d54d117db Mon Sep 17 00:00:00 2001 From: xuegao Date: Wed, 15 Apr 2020 09:35:57 +0200 Subject: Fix bug in undeploy flow Save and flush the deploymentId and statusUrl in the undeploy flow, so that refresh dcae status will use the correct statusUrl. Issue-ID: CLAMP-807 Change-Id: If83c222f772face6f33f00bd8cf5d5c8e55ded55 Signed-off-by: xuegao --- src/main/java/org/onap/clamp/loop/LoopService.java | 2 +- .../org/onap/clamp/policy/microservice/MicroServicePolicyService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/onap/clamp/loop/LoopService.java b/src/main/java/org/onap/clamp/loop/LoopService.java index af1f58ba..6658c5a3 100644 --- a/src/main/java/org/onap/clamp/loop/LoopService.java +++ b/src/main/java/org/onap/clamp/loop/LoopService.java @@ -98,7 +98,7 @@ public class LoopService { public void updateDcaeDeploymentFields(Loop loop, String deploymentId, String deploymentUrl) { loop.setDcaeDeploymentId(deploymentId); loop.setDcaeDeploymentStatusUrl(deploymentUrl); - loopsRepository.save(loop); + loopsRepository.saveAndFlush(loop); } public void updateLoopState(Loop loop, String newState) { diff --git a/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicyService.java b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicyService.java index 37533c1f..060e79a6 100644 --- a/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicyService.java +++ b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicyService.java @@ -91,7 +91,7 @@ public class MicroServicePolicyService implements PolicyService