Got allocatable GPUs.

Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
pull/58/head
Da K. Ma 2018-09-25 12:33:42 +08:00
parent 488f0fcda3
commit adbdbdec49
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ func getGPUsAvailable(f *framework.Framework) int64 {
framework.ExpectNoError(err, "getting node list")
var gpusAvailable int64
for _, node := range nodeList.Items {
if val, ok := node.Status.Capacity[gpuResourceName]; ok {
if val, ok := node.Status.Allocatable[gpuResourceName]; ok {
gpusAvailable += (&val).Value()
}
}