Merge pull request #3596 from tbartelmess/b-min-resource-errors

Fixed error messges for MeetsMinResources
This commit is contained in:
Michael Schurter
2017-11-28 18:20:20 -07:00
committed by GitHub

View File

@@ -1293,10 +1293,10 @@ func (r *Resources) MeetsMinResources() error {
mErr.Errors = append(mErr.Errors, fmt.Errorf("minimum CPU value is %d; got %d", minResources.CPU, r.CPU))
}
if r.MemoryMB < minResources.MemoryMB {
mErr.Errors = append(mErr.Errors, fmt.Errorf("minimum MemoryMB value is %d; got %d", minResources.CPU, r.MemoryMB))
mErr.Errors = append(mErr.Errors, fmt.Errorf("minimum MemoryMB value is %d; got %d", minResources.MemoryMB, r.MemoryMB))
}
if r.IOPS < minResources.IOPS {
mErr.Errors = append(mErr.Errors, fmt.Errorf("minimum IOPS value is %d; got %d", minResources.CPU, r.IOPS))
mErr.Errors = append(mErr.Errors, fmt.Errorf("minimum IOPS value is %d; got %d", minResources.IOPS, r.IOPS))
}
for i, n := range r.Networks {
if err := n.MeetsMinResources(); err != nil {