Merge pull request #92805 from chethanv28/fix-e2e-test-vsphere_utils

Fix vsphere util method - disksAreAttached
This commit is contained in:
Kubernetes Prow Robot 2020-07-10 15:42:51 -07:00 committed by GitHub
commit 42ae2003dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -690,7 +690,7 @@ func registerNodeVM(nodeName, workingDir, vmxFilePath string, rpool *object.Reso
} }
// disksAreAttached takes map of node and it's volumes and returns map of node, its volumes and attachment state // disksAreAttached takes map of node and it's volumes and returns map of node, its volumes and attachment state
func disksAreAttached(nodeVolumes map[string][]string) (nodeVolumesAttachMap map[string]map[string]bool, err error) { func disksAreAttached(nodeVolumes map[string][]string) (map[string]map[string]bool, error) {
ctx, cancel := context.WithCancel(context.Background()) ctx, cancel := context.WithCancel(context.Background())
defer cancel() defer cancel()
@ -713,7 +713,7 @@ func disksAreAttached(nodeVolumes map[string][]string) (nodeVolumesAttachMap map
} }
volumeAttachedMap[volume] = attached volumeAttachedMap[volume] = attached
} }
nodeVolumesAttachMap[vm] = volumeAttachedMap disksAttached[vm] = volumeAttachedMap
} }
return disksAttached, nil return disksAttached, nil
} }