diff options
author | sebdet <sebastien.determe@intl.att.com> | 2019-05-09 19:30:30 +0200 |
---|---|---|
committer | sebdet <sebastien.determe@intl.att.com> | 2019-05-09 19:30:30 +0200 |
commit | 1b55edad8e4a3b6c28c4c8b066de4e6a38f63479 (patch) | |
tree | 8a48ba0a682fa3f0ff4601dc6b75c2908393046b /src/main | |
parent | 2fe9ae1ae42b287c4052de098b150f4b0a8e24ab (diff) |
Fix dcae url status
Set it to null when undeploy is successful
Issue-ID: CLAMP-376
Change-Id: I0c7f7b2e1464bcd72ece47f5d89730de1718b636
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/onap/clamp/loop/LoopOperation.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/org/onap/clamp/loop/LoopOperation.java b/src/main/java/org/onap/clamp/loop/LoopOperation.java index 172b77c28..87effa5fd 100644 --- a/src/main/java/org/onap/clamp/loop/LoopOperation.java +++ b/src/main/java/org/onap/clamp/loop/LoopOperation.java @@ -144,12 +144,13 @@ public class LoopOperation { JSONObject linksObj = (JSONObject) jsonObj.get(DCAE_LINK_FIELD); String statusUrl = (String) linksObj.get(DCAE_STATUS_FIELD); - // use http4 instead of http, because camel http4 component is used to do the - // http call - String newStatusUrl = statusUrl.replaceAll("http:", "http4:").replaceAll("https:", "https4:"); - - loop.setDcaeDeploymentId(deploymentId); - loop.setDcaeDeploymentStatusUrl(newStatusUrl); + if (deploymentId == null) { + loop.setDcaeDeploymentId(null); + loop.setDcaeDeploymentStatusUrl(null); + } else { + loop.setDcaeDeploymentId(deploymentId); + loop.setDcaeDeploymentStatusUrl(statusUrl.replaceAll("http:", "http4:").replaceAll("https:", "https4:")); + } loopService.saveOrUpdateLoop(loop); } |