sangho
Committed by Ray Milkey

[Falcon] SONA : Supports port-create without fixed IPs

Change-Id: I3a37540480912849f03e8880cc8c9b387c6bc613
......@@ -161,7 +161,9 @@ public class OpenstackSwitchingManager implements OpenstackSwitchingService {
@Override
public void createPorts(OpenstackPort openstackPort) {
registerDhcpInfo(openstackPort);
if (!openstackPort.fixedIps().isEmpty()) {
registerDhcpInfo(openstackPort);
}
}
@Override
......
......@@ -73,7 +73,7 @@ public class OpenstackPortCodec extends JsonCodec<OpenstackPort> {
for (JsonNode fixedIpInfo: fixedIpList) {
String subnetId = fixedIpInfo.path(SUBNET_ID).asText();
String ipAddressStr = fixedIpInfo.path(IP_ADDRESS).asText();
if (ipAddressStr != null) {
if (!fixedIpInfo.path(IP_ADDRESS).isMissingNode() && ipAddressStr != null) {
Ip4Address ipAddress = Ip4Address.valueOf(ipAddressStr);
fixedIpMap.put(subnetId, ipAddress);
}
......