Add trace msg in OpenstackSwitchingDhcpHandler.

Change-Id: Id40a09dbf1b209c6ce77d307e7061f1f50a97064
This commit is contained in:
Daniel Park 2018-08-28 17:22:25 +09:00 committed by Jian Li
parent 1455268005
commit e0945c19ca

View File

@ -280,7 +280,12 @@ public class OpenstackSwitchingDhcpHandler {
private Ethernet buildReply(Ethernet ethRequest, byte packetType,
InstancePort reqInstPort) {
log.trace("Build for DHCP reply msg for instance port {}", reqInstPort.toString());
Port osPort = osNetworkService.port(reqInstPort.portId());
if (osPort == null) {
log.error("Failed to retrieve openstack port information for instance port {}",
reqInstPort.toString());
}
// pick one IP address to make a reply
IP fixedIp = osPort.getFixedIps().stream().findFirst().get();
Subnet osSubnet = osNetworkService.subnet(fixedIp.getSubnetId());