diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java index dbac101b3c3..f3dce48d3e5 100755 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -949,9 +949,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati } // Check if the IP range is valid - if (startIp != null || endIp != null) { - checkIpRange(startIp, endIp, cidrAddress, cidrSize); - } + checkIpRange(startIp, endIp, cidrAddress, cidrSize); // Check if the IP range overlaps with the public ip checkOverlapPublicIpRange(zoneId, startIp, endIp); @@ -1011,7 +1009,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati @Override public void doInTransactionWithoutResult(TransactionStatus status) { // Delete private ip addresses for the pod if there are any - List privateIps = _privateIpAddressDao.listByPodIdDcId(Long.valueOf(podId), pod.getDataCenterId()); + List privateIps = _privateIpAddressDao.listByPodIdDcId(podId, pod.getDataCenterId()); if (!privateIps.isEmpty()) { if (!(_privateIpAddressDao.deleteIpAddressByPod(podId))) { throw new CloudRuntimeException("Failed to cleanup private ip addresses for pod " + podId); @@ -1512,13 +1510,8 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati @ActionEvent(eventType = EventTypes.EVENT_ZONE_DELETE, eventDescription = "deleting zone", async = false) public boolean deleteZone(DeleteZoneCmd cmd) { - Long userId = CallContext.current().getCallingUserId(); final Long zoneId = cmd.getId(); - if (userId == null) { - userId = Long.valueOf(User.UID_SYSTEM); - } - // Make sure the zone exists if (!validZone(zoneId)) { throw new InvalidParameterValueException("A zone with ID: " + zoneId + " does not exist."); @@ -2039,7 +2032,6 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati } } else { allowNetworkRate = true; - ; } if (cmd.getNetworkRate() != null && !allowNetworkRate) {