diff options
author | Lukasz Muszkieta <lukasz.muszkieta@nokia.com> | 2020-09-07 08:14:44 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-09-07 08:14:44 +0000 |
commit | 2e715d8ceea7cb9f6e11af16bb21d37895ba8c9b (patch) | |
tree | 49ce6a8269fbb396198f53df7b68fb5b2b7aa1e5 | |
parent | 89be2d744cabc60937176302038c1af766d30751 (diff) | |
parent | b1b59f0067e45efe1d048d24844d2b3afc26c3cd (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.java | 6 |
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(); |