aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukasz Muszkieta <lukasz.muszkieta@nokia.com>2020-09-07 08:14:44 +0000
committerGerrit Code Review <gerrit@onap.org>2020-09-07 08:14:44 +0000
commit2e715d8ceea7cb9f6e11af16bb21d37895ba8c9b (patch)
tree49ce6a8269fbb396198f53df7b68fb5b2b7aa1e5
parent89be2d744cabc60937176302038c1af766d30751 (diff)
parentb1b59f0067e45efe1d048d24844d2b3afc26c3cd (diff)
Merge "Error logging in SO-SDC adapter - in case of service distribution without any resources."
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java6
1 files changed, 6 insertions, 0 deletions
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();