bug 7022: fixing the custom size for volumes bug

status 7022: resolved fixed
This commit is contained in:
abhishek 2010-11-04 15:51:01 -07:00
parent 5695236840
commit e9bd0594bd
1 changed files with 4 additions and 1 deletions

View File

@ -1700,8 +1700,11 @@ public class StorageManagerImpl implements StorageManager {
if ((diskOffering == null) || !DiskOfferingVO.Type.Disk.equals(diskOffering.getType())) {
throw new InvalidParameterValueException("Please specify a valid disk offering.");
}
size = (diskOffering.getDiskSize()*1024*1024);//the disk offering size is in MB, which needs to be converted into bytes
if(diskOffering.getDiskSize() > 0)
size = (diskOffering.getDiskSize()*1024*1024);//the disk offering size is in MB, which needs to be converted into bytes
else
size = (size*1024*1024);//custom size made consistent with disk offering size which is in MB, to be converted to bytes
}
} else {
Long snapshotId = cmd.getSnapshotId();