bug 8689: don't allow to reset Availability for default Direct network offering

status 8689: resolved fixed
This commit is contained in:
alena 2011-03-02 15:58:44 -08:00
parent 1025f16940
commit f36ed9b51a

View File

@ -2608,6 +2608,11 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
throw new InvalidParameterValueException("Can't update system network offerings"); throw new InvalidParameterValueException("Can't update system network offerings");
} }
//Don't allow to update default Direct network offering
if (offeringToUpdate.isDefault() && offeringToUpdate.getGuestType() == GuestIpType.Direct) {
throw new InvalidParameterValueException("Can't update Default Direct network offering");
}
NetworkOfferingVO offering = _networkOfferingDao.createForUpdate(id); NetworkOfferingVO offering = _networkOfferingDao.createForUpdate(id);
if (name != null) { if (name != null) {