From 95511cbe373d5cf138689b091a1ef26c199868f8 Mon Sep 17 00:00:00 2001 From: sebdet Date: Thu, 7 Feb 2019 13:53:55 +0100 Subject: Add exception for DCAE Add exception when DCAE does not return an answer as the CSAR is not deployed in that case Issue-ID: CLAMP-291 Change-Id: Ibe2dc96f415e54c4e15b6dd57b214207e5dc22af Signed-off-by: sebdet --- .../onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java index 94cffbb7f..50090920e 100644 --- a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java +++ b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java @@ -246,6 +246,11 @@ public class CsarInstallerImpl implements CsarInstaller { private CldsModel createFakeCldsModel(CsarHandler csar, BlueprintArtifact blueprintArtifact, CldsTemplate cldsTemplate, DcaeInventoryResponse dcaeInventoryResponse) throws SdcArtifactInstallerException { + + if (dcaeInventoryResponse == null) { + throw new SdcArtifactInstallerException( + "DCAE inventory response is NULL, query to DCAE fail to be answered properly, this is required to deploy CSAR properly !!!"); + } try { CldsModel cldsModel = new CldsModel(); cldsModel.setName(buildModelName(csar, blueprintArtifact.getResourceAttached().getResourceInstanceName())); -- cgit 1.2.3-korg