From 694ec684a372c95abf8d1a798714b6f074862816 Mon Sep 17 00:00:00 2001 From: Min Chen Date: Fri, 25 Oct 2013 21:24:08 -0700 Subject: [PATCH] Add back initialization of _maxVolumeSizeInGb in VolumeApiServiceImpl. --- server/src/com/cloud/storage/VolumeApiServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/src/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/com/cloud/storage/VolumeApiServiceImpl.java index 071281c41fe..e4c82649f34 100644 --- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java +++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java @@ -25,6 +25,8 @@ import java.util.concurrent.ExecutionException; import javax.inject.Inject; +import org.apache.log4j.Logger; + import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd; import org.apache.cloudstack.api.command.user.volume.CreateVolumeCmd; @@ -64,7 +66,6 @@ import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao; import org.apache.cloudstack.storage.datastore.db.VolumeDataStoreDao; import org.apache.cloudstack.storage.datastore.db.VolumeDataStoreVO; import org.apache.cloudstack.storage.image.datastore.ImageStoreEntity; -import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; import com.cloud.agent.api.Answer; @@ -1726,6 +1727,8 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic String _customDiskOfferingMinSizeStr = _configDao.getValue(Config.CustomDiskOfferingMinSize.toString()); _customDiskOfferingMinSize = NumbersUtil.parseInt(_customDiskOfferingMinSizeStr, Integer.parseInt(Config.CustomDiskOfferingMinSize.getDefaultValue())); + String maxVolumeSizeInGbString = _configDao.getValue(Config.MaxVolumeSize.toString()); + _maxVolumeSizeInGb = NumbersUtil.parseLong(maxVolumeSizeInGbString, 2000); return true; } @@ -1735,7 +1738,7 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic @Inject public void setStoragePoolAllocators(List storagePoolAllocators) { - this._storagePoolAllocators = storagePoolAllocators; + _storagePoolAllocators = storagePoolAllocators; } }