diff --git a/vendor/github.com/vmware/govmomi/object/virtual_machine.go b/vendor/github.com/vmware/govmomi/object/virtual_machine.go index 4faeae75e3..7016101c35 100644 --- a/vendor/github.com/vmware/govmomi/object/virtual_machine.go +++ b/vendor/github.com/vmware/govmomi/object/virtual_machine.go @@ -300,13 +300,6 @@ func (v VirtualMachine) WaitForNetIP(ctx context.Context, v4 bool) (map[string][ } } } - - for _, ips := range macs { - if len(ips) == 0 { - return false - } - } - return true }) @@ -314,7 +307,14 @@ func (v VirtualMachine) WaitForNetIP(ctx context.Context, v4 bool) (map[string][ return nil, err } - return macs, nil + nonEmptyMacs := make(map[string][]string) + for mac, ips := range macs { + if len(ips) != 0 { + nonEmptyMacs[mac] = ips + } + } + + return nonEmptyMacs, nil } // Device returns the VirtualMachine's config.hardware.device property.