Cloudstack-2548: Failed to delete public IP range

Public IP range deletion after it is dedicated fails with IP range being
used for DHCP offers.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
Bharat Kumar 2013-05-21 12:21:01 +05:30 committed by Prasanna Santhanam
parent 09c6030ae9
commit 47a562a2c0
1 changed files with 8 additions and 1 deletions

View File

@ -3071,9 +3071,16 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
}
}
} else {
// when there is no dhcp support in the network.
if (!deletePublicIPRange(vlanDbId)) {
return false;
}
_vlanDao.expunge(vlanDbId);
return true;
}
}
throw new InvalidParameterValueException("One of the ips in the range is used to provide Dhcp service to this subnet. cannot delete this range as ");
return false;
}