mirror of https://github.com/apache/cloudstack.git
bug 6203: changed the functionality for custom volume and disk offering creation
status 6203: resolved fixed
This commit is contained in:
parent
a016aa27cd
commit
573885c615
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue