Zone check in createNetwork for Bug 6873 - disable/enable mode for clusters (and pods and zones and hosts)

This commit is contained in:
prachi 2011-03-23 22:20:53 -07:00
parent 923f562aa8
commit 50244b79ab

View File

@ -1463,9 +1463,12 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
}
// Check if zone exists
DataCenterVO zone = _dcDao.findById(zoneId);
if (zoneId == null) {
throw new InvalidParameterValueException("Please specify a valid zone.");
}
if (zoneId == null || zone == null) {
DataCenterVO zone = _dcDao.findById(zoneId);
if (zone == null) {
throw new InvalidParameterValueException("Please specify a valid zone.");
}