mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fix coverity issue 606007, 606008
This commit is contained in:
parent
044a2078a1
commit
16d333f06d
@ -92,6 +92,9 @@ public class OpenDaylightControllerResourceManagerImpl implements OpenDaylightCo
|
||||
|
||||
final String deviceName = NetworkDevice.OpenDaylightController.getName();
|
||||
NetworkDevice networkDevice = NetworkDevice.getNetworkDevice(deviceName);
|
||||
if (networkDevice == null) {
|
||||
throw new CloudRuntimeException("No network device found for name " + deviceName);
|
||||
}
|
||||
final Long physicalNetworkId = cmd.getPhysicalNetworkId();
|
||||
PhysicalNetworkVO physicalNetwork = physicalNetworkDao.findById(physicalNetworkId);
|
||||
if (physicalNetwork == null) {
|
||||
@ -156,6 +159,7 @@ public class OpenDaylightControllerResourceManagerImpl implements OpenDaylightCo
|
||||
// Lets see if there are networks that use us
|
||||
List<NetworkVO> networkList = networkDao.listByPhysicalNetwork(physicalNetworkId);
|
||||
|
||||
if (networkList != null) {
|
||||
// Networks with broadcast type lswitch are ours
|
||||
for (NetworkVO network : networkList) {
|
||||
if (network.getBroadcastDomainType() == Networks.BroadcastDomainType.OpenDaylight) {
|
||||
@ -165,6 +169,7 @@ public class OpenDaylightControllerResourceManagerImpl implements OpenDaylightCo
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HostVO host = hostDao.findById(controller.getHostId());
|
||||
Long hostId = host.getId();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user