commit | c807c1c02d8b5ce29b9dfc4b7ea11220cdae9a60 | [log] [tgz] |
---|---|---|
author | Daniel Park <dan.mcpark84@gmail.com> | Tue Aug 28 17:22:25 2018 +0900 |
committer | Jian Li <pyguni@gmail.com> | Tue Aug 28 14:50:42 2018 +0000 |
tree | 7b3b98e27fab2475f3e11791aba6b404d6356075 | |
parent | cae41a385eb4ae9178094b37ce92cc51281e79df [diff] |
Add trace msg in OpenstackSwitchingDhcpHandler. Change-Id: Id40a09dbf1b209c6ce77d307e7061f1f50a97064 (cherry picked from commit e0945c19ca642f219d735f16d33d6d40a1d016ac)
diff --git a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingDhcpHandler.java b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingDhcpHandler.java index 0c0e81e..b3fb034 100644 --- a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingDhcpHandler.java +++ b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingDhcpHandler.java
@@ -280,7 +280,12 @@ 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());