summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-04-09 11:13:34 +0200
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-04-09 11:13:34 +0200
commit6a5e92c5bb38f668b1be86adee513602f8151bb5 (patch)
treeaf3a67dbd5e237a9c1d4a10a19d60f22b807b955 /src
parent7e76d179c785b01558a92ffa1ee64b3ac4453b1f (diff)
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) <sd378r@intl.att.com>
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/onap/clamp/clds/sdc/controller/SdcSingleController.java14
1 files changed, 7 insertions, 7 deletions
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 a0449a32..627bc72a 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
@@ -207,19 +207,19 @@ public class SdcSingleController {
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());
csarInstaller.installTheCsar(csar);
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);