summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-04-27 14:39:55 +0200
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-04-27 14:39:55 +0200
commit8b4d54436b3283580d2776b0d48eab3c381d0419 (patch)
treeaa10ac2270afafcd6a3fd69cc9511c7fd80e89f9 /src/main/java/org
parent5f0757a3a6d584de82731eaa247fc1c3c9f46b55 (diff)
Remove DCAE call
Remove DCAE inventory call when CL is deployed from SDC in submit action, as the DCAE inventory is already done during deployment. Issue-ID: CLAMP-151 Change-Id: Ib2c744b53a8e4dc9371ae982612ea2822d7a9ad8 Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/onap/clamp/clds/service/CldsService.java14
1 files changed, 10 insertions, 4 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 c3eb83bff..6da3cb641 100644
--- a/src/main/java/org/onap/clamp/clds/service/CldsService.java
+++ b/src/main/java/org/onap/clamp/clds/service/CldsService.java
@@ -489,10 +489,16 @@ public class CldsService extends SecureServiceBase {
if (!isTest && (actionCd.equalsIgnoreCase(CldsEvent.ACTION_SUBMIT)
|| actionCd.equalsIgnoreCase(CldsEvent.ACTION_RESUBMIT)
|| actionCd.equalsIgnoreCase(CldsEvent.ACTION_SUBMITDCAE))) {
- // To verify inventory status and modify model status to
- // distribute
- dcaeInventoryServices.setEventInventory(retrievedModel, getUserId());
- retrievedModel.save(cldsDao, getUserId());
+ if (retrievedModel.getDeploymentId() == null) {
+ // 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());
+ } else {
+ logger.info("Skipping DCAE inventory call as closed loop has been created from SDC notification");
+ }
}
// audit log
LoggingUtils.setTimeContext(startTime, new Date());