Error logging in SO-SDC adapter - in case of service distribution without any resources. 82/112182/1
authorAgata Stanislawska <agata.stanislawska@nokia.com>
Fri, 4 Sep 2020 07:46:15 +0000 (09:46 +0200)
committerastanisl <agata.stanislawska@nokia.com>
Fri, 4 Sep 2020 14:52:35 +0000 (16:52 +0200)
Issue-ID: SO-2978
Signed-off-by: astanisl <agata.stanislawska@nokia.com>
Change-Id: I6a176143b004dfc19633e678ea7ee063d9e6df42
Signed-off-by: astanisl <agata.stanislawska@nokia.com>
asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java

index ad96e1b..61c0cdb 100644 (file)
@@ -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();