aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuleshov, Elena <evn@att.com>2020-08-25 10:05:34 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2020-08-25 10:05:35 -0400
commita102aedad78cd54bba3e7c92b0c1bbefd0508044 (patch)
tree3d0444a8b06bcd58a3601035b1b9e20aabee6393
parent395ebf29b5541bbbe3864f9638973afec95abe05 (diff)
Additional null checks while building vserver
Additional null checks while building vserver interfaces. Issue-ID: SO-3197 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I9835535e6b13ee434a1532e1a739184b56bbc011
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
index ef2577d6fe..45d91c26c4 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
@@ -303,6 +303,8 @@ public class HeatBridgeImpl implements HeatBridgeApi {
Objects.requireNonNull(osClient, ERR_MSG_NULL_OS_CLIENT);
List<String> portIds =
extractStackResourceIdsByResourceType(stackResources, HeatBridgeConstants.OS_PORT_RESOURCE_TYPE);
+ if (portIds == null)
+ return;
for (String portId : portIds) {
Port port = osClient.getPortById(portId);
Network network = osClient.getNetworkById(port.getNetworkId());
@@ -320,7 +322,7 @@ public class HeatBridgeImpl implements HeatBridgeApi {
lIf.setInterfaceRole(port.getvNicType());
}
boolean isL2Multicast = false;
- if (port.getProfile().get("trusted") != null) {
+ if (port.getProfile() != null && port.getProfile().get("trusted") != null) {
String trusted = port.getProfile().get("trusted").toString();
if (Boolean.parseBoolean(trusted)) {
isL2Multicast = true;