mirror of https://github.com/apache/cloudstack.git
Cloudstack-2732 [Multiple_IP_Ranges] Deleting guest IP range is not throwing any error message to user while the ip addresses are being used
Signed-off-by: Jayapal <jayapal@apache.org>
This commit is contained in:
parent
6b0df2566d
commit
974245991c
|
|
@ -3267,6 +3267,10 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
|
|||
}
|
||||
else {
|
||||
ipAlias = _nicIpAliasDao.findByGatewayAndNetworkIdAndState(vlanRange.getVlanGateway(), vlanRange.getNetworkId(), NicIpAlias.state.active);
|
||||
if (ipAlias == null) {
|
||||
throw new InvalidParameterValueException ("Cannot delete this range as some of the Ips are in use.");
|
||||
}
|
||||
|
||||
//check if this ip belongs to this vlan and is allocated.
|
||||
ip = _publicIpAddressDao.findByIpAndVlanId(ipAlias.getIp4Address(), vlanDbId);
|
||||
if (ip != null && ip.getState() == IpAddress.State.Allocated) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue