mirror of https://github.com/apache/cloudstack.git
bug 6141: fixed the error of not providing the right error for an incorrect diskoffering
status 6141: resolved fixed
This commit is contained in:
parent
dbde0cd39b
commit
3abe056736
|
|
@ -117,6 +117,14 @@ public class CreateVolumeCmd extends BaseCmd {
|
|||
size = Long.valueOf(0);
|
||||
}
|
||||
|
||||
if(diskOfferingId != null){
|
||||
DiskOfferingVO dOffering = getManagementServer().findDiskOfferingById(diskOfferingId.longValue());
|
||||
|
||||
if(dOffering == null){
|
||||
throw new ServerApiException(BaseCmd.PARAM_ERROR,"Diskoffering id:"+diskOfferingId+" is invalid");
|
||||
}
|
||||
}
|
||||
|
||||
boolean useSnapshot = false;
|
||||
if (snapshotId == null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue