azureTemplate.setVolumeSize((json.getVolumeSize() == null) ? 0 : json.getVolumeSize());
AzureVmType azureVmType = AzureVmType.valueOf(json.getParameters().get(AzureTemplateParam.VMTYPE.getName()).toString());
if (azureVmType.maxDiskSize() < azureTemplate.getVolumeCount()) {
throw new BadRequestException(
String.format("Azure not support this volumesize on the %s. The max suppported size is: %s",
azureVmType.vmType(),
azureVmType.maxDiskSize()));
}
return azureTemplate;
}