From 6a5e92c5bb38f668b1be86adee513602f8151bb5 Mon Sep 17 00:00:00 2001 From: "Determe, Sebastien (sd378r)" Date: Mon, 9 Apr 2018 11:13:34 +0200 Subject: Fix SDC deployment Fix the SDC deployment, inversion of the "already existing" check Issue-ID: CLAMP-151 Change-Id: I2d83033dd5df373965196dd00ead6fcab9bdc260 Signed-off-by: Determe, Sebastien (sd378r) --- .../clamp/clds/sdc/controller/SdcSingleController.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/org/onap/clamp/clds/sdc/controller/SdcSingleController.java b/src/main/java/org/onap/clamp/clds/sdc/controller/SdcSingleController.java index a0449a32f..627bc72ad 100644 --- a/src/main/java/org/onap/clamp/clds/sdc/controller/SdcSingleController.java +++ b/src/main/java/org/onap/clamp/clds/sdc/controller/SdcSingleController.java @@ -206,6 +206,13 @@ public class SdcSingleController { refProp.getStringValue(CONFIG_SDC_FOLDER)); csar.save(downloadTheArtifact(csar.getArtifactElement())); if (csarInstaller.isCsarAlreadyDeployed(csar)) { + this.sendSdcNotification(NotificationType.DOWNLOAD, csar.getArtifactElement().getArtifactURL(), + sdcConfig.getConsumerID(), iNotif.getDistributionID(), + DistributionStatusEnum.ALREADY_DOWNLOADED, null, System.currentTimeMillis()); + this.sendSdcNotification(NotificationType.DOWNLOAD, csar.getArtifactElement().getArtifactURL(), + sdcConfig.getConsumerID(), iNotif.getDistributionID(), DistributionStatusEnum.ALREADY_DEPLOYED, + null, System.currentTimeMillis()); + } else { this.sendSdcNotification(NotificationType.DOWNLOAD, csar.getArtifactElement().getArtifactURL(), sdcConfig.getConsumerID(), iNotif.getDistributionID(), DistributionStatusEnum.DOWNLOAD_OK, null, System.currentTimeMillis()); @@ -213,13 +220,6 @@ public class SdcSingleController { this.sendSdcNotification(NotificationType.DEPLOY, csar.getArtifactElement().getArtifactURL(), sdcConfig.getConsumerID(), iNotif.getDistributionID(), DistributionStatusEnum.DEPLOY_OK, null, System.currentTimeMillis()); - } else { - this.sendSdcNotification(NotificationType.DOWNLOAD, csar.getArtifactElement().getArtifactURL(), - sdcConfig.getConsumerID(), iNotif.getDistributionID(), - DistributionStatusEnum.ALREADY_DOWNLOADED, null, System.currentTimeMillis()); - this.sendSdcNotification(NotificationType.DOWNLOAD, csar.getArtifactElement().getArtifactURL(), - sdcConfig.getConsumerID(), iNotif.getDistributionID(), DistributionStatusEnum.ALREADY_DEPLOYED, - null, System.currentTimeMillis()); } } catch (SdcArtifactInstallerException e) { logger.error("SdcArtifactInstallerException exception caught during the notification processing", e); -- cgit 1.2.3-korg