Merge pull request #6242 from yousong/bugfix/yousong-wording

disks: reword error message on bad DiskConfig struct
This commit is contained in:
Zexi Li
2020-05-10 11:28:44 +08:00
committed by GitHub
+1 -1
View File
@@ -1611,7 +1611,7 @@ func parseDiskInfo(ctx context.Context, userCred mcclient.TokenCredential, info
// diskConfig.SizeMb = options.Options.DefaultDiskSize // MB
// else
if len(info.ImageId) == 0 && info.SizeMb == 0 {
return nil, httperrors.NewInputParameterError("Diskinfo not contains either imageID or size")
return nil, httperrors.NewInputParameterError("Diskinfo index %d: both imageID and size are absent", info.Index)
}
return info, nil
}