private NeutronSubnet getExternalNetworkSubnet(NeutronPort gatewayPort){ if (gatewayPort.getFixedIPs() == null) { return null; } for (Neutron_IPs neutronIPs : gatewayPort.getFixedIPs()) { String subnetUUID = neutronIPs.getSubnetUUID(); NeutronSubnet extSubnet = neutronSubnetCache.getSubnet(subnetUUID); if (extSubnet != null && extSubnet.getGatewayIP() != null) { return extSubnet; } if (extSubnet == null) { // TODO: when subnet is created, try again. LOG.debug("subnet {} in not found", subnetUUID); } } return null; }
NeutronSubnet neutronSubnet = neutronSubnetCache.getSubnet(subnetUuid); if (neutronSubnet == null) { LOG.error("getDHCPServerPort: No subnet is found for " + subnetUuid);
final NeutronSubnet sourceSubnet = neutronSubnetCache.getSubnet(sourceSubnetId); final String sourceNetworkId = sourceSubnet == null ? null : sourceSubnet.getNetworkUUID(); if (sourceNetworkId == null) {
String macAddress = neutronPort != null ? neutronPort.getMacAddress() : null; List<Neutron_IPs> ipList = neutronPort != null ? neutronPort.getFixedIPs() : null; final NeutronSubnet subnet = neutronSubnetCache.getSubnet(destNeutronRouterInterface.getSubnetUUID()); final NeutronNetwork neutronNetwork = subnet != null ? neutronNetworkCache.getNetwork(subnet.getNetworkUUID()) : null;