CLOUDSTACK-300: Creation of compute offering allow combination of local storage + HA

This commit is contained in:
Saksham Srivastava 2014-08-26 14:44:49 +05:30
parent 384025f258
commit 9fb2a760c6

View File

@ -2006,17 +2006,21 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
throw new InvalidParameterValueException("Please specify a valid domain id");
}
Boolean offerHA = cmd.getOfferHa();
boolean localStorageRequired = false;
String storageType = cmd.getStorageType();
if (storageType != null) {
if (storageType.equalsIgnoreCase(ServiceOffering.StorageType.local.toString())) {
if(offerHA) {
throw new InvalidParameterValueException("HA offering with local storage is not supported. ");
}
localStorageRequired = true;
} else if (!storageType.equalsIgnoreCase(ServiceOffering.StorageType.shared.toString())) {
throw new InvalidParameterValueException("Invalid storage type " + storageType + " specified, valid types are: 'local' and 'shared'");
}
}
Boolean offerHA = cmd.getOfferHa();
Boolean limitCpuUse = cmd.GetLimitCpuUse();
Boolean volatileVm = cmd.getVolatileVm();