Merge "Enable complex data types in service instanceParams"
authorShashikanth VH <shashikanth.vh@huawei.com>
Mon, 11 Apr 2022 12:24:24 +0000 (12:24 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 11 Apr 2022 12:24:24 +0000 (12:24 +0000)
adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/utils/HeatBridgeUtils.java

index c281dbd..17fd994 100644 (file)
@@ -35,6 +35,7 @@ package org.onap.so.heatbridge.utils;
 
 import com.google.common.base.Preconditions;
 import com.google.common.base.Strings;
+import java.util.Collections;
 import java.util.List;
 import java.util.Optional;
 import java.util.stream.Collectors;
@@ -71,6 +72,9 @@ public final class HeatBridgeUtils {
     }
 
     public static List<String> extractPciIdsFromVServer(Vserver vserver) {
+        if (vserver.getLInterfaces() == null) {
+            return Collections.emptyList();
+        }
         return vserver.getLInterfaces().getLInterface().stream()
                 .filter(lInterface -> lInterface.getSriovVfs() != null
                         && CollectionUtils.isNotEmpty(lInterface.getSriovVfs().getSriovVf()))