From: Agata Stanislawska Date: Fri, 4 Sep 2020 07:46:15 +0000 (+0200) Subject: Error logging in SO-SDC adapter - in case of service distribution without any resources. X-Git-Tag: 1.7.4~103^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=b1b59f0067e45efe1d048d24844d2b3afc26c3cd;p=so.git Error logging in SO-SDC adapter - in case of service distribution without any resources. Issue-ID: SO-2978 Signed-off-by: astanisl Change-Id: I6a176143b004dfc19633e678ea7ee063d9e6df42 Signed-off-by: astanisl --- diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java index ad96e1be4b..61c0cdbf2e 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java @@ -754,6 +754,12 @@ public class ASDCController { } // process NsstResource this.processNsstNotification(iNotif, toscaResourceStructure); + + if (iNotif.getResources().isEmpty()) { + logger.error("Service Model contains no resources."); + return; + } + for (IResourceInstance resource : iNotif.getResources()) { String resourceType = resource.getResourceType();