aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-05-02 13:53:39 +0200
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-05-02 13:53:39 +0200
commit81f07356b46b66037ddabda3d23eef0f5e4aa60f (patch)
tree181480d56dc79b32f8a76a9c6cb93a5dd96a0cc6 /src/main
parent1d40770936891a836fb24e9c03dec78fd115c14b (diff)
Invert test
Invert the test for SDC controller case when submitting the CL Issue-ID: CLAMP-151 Change-Id: I7d3fa51bf77580eaf0843440c9073cd3ccb393b2 Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/clamp/clds/service/CldsService.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/org/onap/clamp/clds/service/CldsService.java b/src/main/java/org/onap/clamp/clds/service/CldsService.java
index ef788753..4d14590d 100644
--- a/src/main/java/org/onap/clamp/clds/service/CldsService.java
+++ b/src/main/java/org/onap/clamp/clds/service/CldsService.java
@@ -491,18 +491,19 @@ public class CldsService extends SecureServiceBase {
|| actionCd.equalsIgnoreCase(CldsEvent.ACTION_RESUBMIT)
|| actionCd.equalsIgnoreCase(CldsEvent.ACTION_SUBMITDCAE))) {
if (retrievedModel.getTemplateName().startsWith(CsarInstallerImpl.TEMPLATE_NAME_PREFIX)) {
- // This should be done only when the call to DCAE
- // has not yet been done. When CL comes from SDC
- // this is not required as the DCAE inventory call is done
- // during the CL deployment.
- dcaeInventoryServices.setEventInventory(retrievedModel, getUserId());
- } else {
+ // SDC artifact case
logger.info("Skipping DCAE inventory call as closed loop has been created from SDC notification");
DcaeEvent dcaeEvent = new DcaeEvent();
dcaeEvent.setArtifactName("SDC artifact-" + retrievedModel.getName());
dcaeEvent.setEvent(DcaeEvent.EVENT_DISTRIBUTION);
CldsEvent.insEvent(cldsDao, dcaeEvent.getControlName(), userId, dcaeEvent.getCldsActionCd(),
CldsEvent.ACTION_STATE_RECEIVED, null);
+ } else {
+ // This should be done only when the call to DCAE
+ // has not yet been done. When CL comes from SDC
+ // this is not required as the DCAE inventory call is done
+ // during the CL deployment.
+ dcaeInventoryServices.setEventInventory(retrievedModel, getUserId());
}
retrievedModel.save(cldsDao, getUserId());
}