mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
CLOUDSTACK-7541: Added restriction to not allow custom disk offering with disksize UI doesn't allow but with API we were able to create custom disk offering with disk size which was causing this issue
This closes #28
This commit is contained in:
parent
e8a47594da
commit
efe47b0704
@ -37,6 +37,8 @@ import javax.ejb.Local;
|
||||
import javax.inject.Inject;
|
||||
import javax.naming.ConfigurationException;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.acl.SecurityChecker;
|
||||
import org.apache.cloudstack.affinity.AffinityGroup;
|
||||
import org.apache.cloudstack.affinity.AffinityGroupService;
|
||||
@ -84,7 +86,6 @@ import org.apache.cloudstack.region.dao.RegionDao;
|
||||
import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
|
||||
import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
|
||||
import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.alert.AlertManager;
|
||||
import com.cloud.api.ApiDBUtils;
|
||||
@ -2347,6 +2348,10 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
|
||||
throw new InvalidParameterValueException("Disksize is required for a non-customized disk offering");
|
||||
}
|
||||
|
||||
if (isCustomized && numGibibytes != null) {
|
||||
throw new InvalidParameterValueException("Disksize is not allowed for a customized disk offering");
|
||||
}
|
||||
|
||||
boolean localStorageRequired = false;
|
||||
String storageType = cmd.getStorageType();
|
||||
if (storageType != null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user