Updated Branches:
  refs/heads/4.2 9a3adc97c -> 12a013798

CLOUDSTACK-6087: Read max custom disk offering size from database,
rather than hard-coded max value of 1024


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

Branch: refs/heads/4.2
Commit: 12a013798aae2d9e4ddb2c3d40570f2568d4cc64
Parents: 9a3adc9
Author: Marcus Sorensen <[email protected]>
Authored: Wed Feb 12 10:41:14 2014 -0700
Committer: Marcus Sorensen <[email protected]>
Committed: Wed Feb 12 10:41:14 2014 -0700

----------------------------------------------------------------------
 server/src/com/cloud/storage/VolumeManagerImpl.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/12a01379/server/src/com/cloud/storage/VolumeManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeManagerImpl.java 
b/server/src/com/cloud/storage/VolumeManagerImpl.java
index 7295391..10d4239 100644
--- a/server/src/com/cloud/storage/VolumeManagerImpl.java
+++ b/server/src/com/cloud/storage/VolumeManagerImpl.java
@@ -328,7 +328,7 @@ public class VolumeManagerImpl extends ManagerBase 
implements VolumeManager {
     @Inject
     StorageManager storageMgr;
     private int _customDiskOfferingMinSize = 1;
-    private final int _customDiskOfferingMaxSize = 1024;
+    private int _customDiskOfferingMaxSize = 1024;
     private long _maxVolumeSizeInGb;
     private boolean _recreateSystemVmEnabled;
     private boolean _storageHAMigrationEnabled;    
@@ -2705,6 +2705,10 @@ public class VolumeManagerImpl extends ManagerBase 
implements VolumeManager {
                 .parseInt(Config.CustomDiskOfferingMinSize
                         .getDefaultValue()));
 
+        String _customDiskOfferingMaxSizeStr = 
_configDao.getValue(Config.CustomDiskOfferingMaxSize.toString());
+        Integer defaultCustomDiskOfferingMaxSize = 
Integer.parseInt(Config.CustomDiskOfferingMaxSize.getDefaultValue());
+        _customDiskOfferingMaxSize = 
NumbersUtil.parseInt(_customDiskOfferingMaxSizeStr, 
defaultCustomDiskOfferingMaxSize);
+
         String maxVolumeSizeInGbString = _configDao
                 .getValue("storage.max.volume.size");
         _maxVolumeSizeInGb = NumbersUtil.parseLong(maxVolumeSizeInGbString,

Reply via email to