diff options
author | Smokowski, Steven <steve.smokowski@att.com> | 2020-06-02 14:34:36 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@att.com> | 2020-06-02 14:34:36 -0400 |
commit | 30b143b7cbaf3ec7a843bf1ff52b298eb4550be6 (patch) | |
tree | 074f6faaba452649fdaf53b9352fb619638ca278 | |
parent | 48aad3a3181c6990abb84206027555d473cf71b3 (diff) |
Add null check for network name
Add null check for network name
Issue-ID: SO-2971
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: Ifb3fe5f7b85157ddb29efec385b7a77ab3701249
-rw-r--r-- | adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java | 6 |
1 files changed, 4 insertions, 2 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 bbabd7fab8..32cd92d70e 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 @@ -59,7 +59,6 @@ import org.onap.aai.domain.yang.VfModule; import org.onap.aai.domain.yang.Vlan; import org.onap.aai.domain.yang.Vlans; import org.onap.aai.domain.yang.Vserver; -import org.onap.logging.filter.base.ErrorCode; import org.onap.aaiclient.client.aai.AAIObjectType; import org.onap.aaiclient.client.aai.AAIResourcesClient; import org.onap.aaiclient.client.aai.AAISingleTransactionClient; @@ -69,6 +68,7 @@ import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri; import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory; import org.onap.aaiclient.client.graphinventory.entities.uri.Depth; import org.onap.aaiclient.client.graphinventory.exceptions.BulkProcessFailed; +import org.onap.logging.filter.base.ErrorCode; import org.onap.so.db.catalog.beans.CloudIdentity; import org.onap.so.db.catalog.beans.ServerType; import org.onap.so.heatbridge.constants.HeatBridgeConstants; @@ -263,7 +263,9 @@ public class HeatBridgeImpl implements HeatBridgeApi { lIf.setInterfaceId(port.getId()); lIf.setInterfaceName(port.getName()); lIf.setMacaddr(port.getMacAddress()); - lIf.setNetworkName((String) port.getProfile().get("physical_network")); + if (port.getProfile() != null && port.getProfile().get("physical_network") != null) { + lIf.setNetworkName((String) port.getProfile().get("physical_network")); + } lIf.setIsPortMirrored(false); lIf.setIsIpUnnumbered(false); lIf.setInMaint(false); |