From b1b59f0067e45efe1d048d24844d2b3afc26c3cd Mon Sep 17 00:00:00 2001 From: Agata Stanislawska Date: Fri, 4 Sep 2020 09:46:15 +0200 Subject: 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 --- .../src/main/java/org/onap/so/asdc/client/ASDCController.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'asdc-controller/src') 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(); -- cgit 1.2.3-korg