From 7ae772d0115598564a5440f5400ab256252dcc2e Mon Sep 17 00:00:00 2001 From: "Smokowski, Steven" Date: Thu, 14 May 2020 09:54:38 -0400 Subject: Default gateway value to NULL when not present Default gateway value to NULL when not present Issue-ID: SO-2934 Signed-off-by: Benjamin, Max (mb388a) Change-Id: I7a9839817887575ec425e2ae6f1782b94f0bb907 --- .../so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bpmn/so-bpmn-tasks/src/main/java/org') diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java index 3f81e432e1..e317822a13 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java @@ -287,6 +287,9 @@ public class NetworkAdapterObjectMapper { for (org.onap.so.bpmn.servicedecomposition.bbobjects.Subnet subnet : subnets) { org.onap.so.openstack.beans.Subnet openstackSubnet = modelMapper.map(subnet, org.onap.so.openstack.beans.Subnet.class); + if (StringUtils.isEmpty(openstackSubnet.getGatewayIp())) { + openstackSubnet.setGatewayIp("NULL"); + } // update cidr value if (subnet.getNetworkStartAddress() != null && subnet.getCidrMask() != null) openstackSubnet -- cgit 1.2.3-korg