cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajeshbatt...@apache.org
Subject [2/5] git commit: updated refs/heads/4.5 to 9c328cb
Date Tue, 18 Nov 2014 08:52:32 GMT
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/4721e66d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4721e66d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4721e66d

Branch: refs/heads/4.5
Commit: 4721e66d0e2ed89836286f1654a30a3568b284b6
Parents: 44d1233
Author: Anshul Gangwar <anshul.gangwar@citrix.com>
Authored: Wed Oct 22 09:59:42 2014 +0530
Committer: Rajesh Battala <rajesh.battala@citrix.com>
Committed: Tue Nov 18 14:24:58 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/4721e66d/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 628cbc7..05b220a 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;
@@ -2353,6 +2354,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) {


Mime
View raw message