You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ra...@apache.org on 2014/11/17 12:01:25 UTC

git commit: updated refs/heads/master to efe47b0

Repository: cloudstack
Updated Branches:
  refs/heads/master e8a47594d -> efe47b070


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


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/efe47b07
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/efe47b07
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/efe47b07

Branch: refs/heads/master
Commit: efe47b07044a863e5a34f48ef6e2468265925604
Parents: e8a4759
Author: Anshul Gangwar <an...@citrix.com>
Authored: Wed Oct 22 09:59:42 2014 +0530
Committer: Rajesh Battala <ra...@citrix.com>
Committed: Mon Nov 17 16:34:26 2014 +0530

----------------------------------------------------------------------
 .../src/com/cloud/configuration/ConfigurationManagerImpl.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/efe47b07/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index 75e0a37..2ba6ac1 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -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) {