bug 6203: changed the functionality for custom volume and disk offering creation

status 6203: resolved fixed
This commit is contained in:
abhishek 2010-09-17 16:58:59 -07:00
parent a016aa27cd
commit 573885c615
2 changed files with 2 additions and 9 deletions

View File

@ -155,7 +155,7 @@ public class CreateVolumeCmd extends BaseCmd {
//this is the case of creating var size vol with private disk offering
List<DiskOfferingVO> privateTemplateList = getManagementServer().findPrivateDiskOffering();
diskOfferingId = privateTemplateList.get(0).getId(); //we use this id for creating volume
diskOfferingId = privateTemplateList.get(0).getId(); //we use this id for creating volume, randomly tagging it to a pool with an offering
}
}
else

View File

@ -7100,14 +7100,7 @@ public class ManagementServerImpl implements ManagementServer {
if (numGibibytes > _maxVolumeSizeInGb) {
throw new InvalidParameterValueException("The maximum allowed size for a disk is " + _maxVolumeSizeInGb + " Gb.");
}
if(numGibibytes==0){
List<DiskOfferingVO> existingOffering = _diskOfferingDao.findPrivateDiskOffering();
if(existingOffering!=null && existingOffering.size()>0)
throw new InternalErrorException("There already exists a private disk offering");
}
return _configMgr.createDiskOffering(userId, domainId, name, description, numGibibytes, tags);
}