vmware / govmomi

Go library for the VMware vSphere API
Apache License 2.0
2.31k stars 911 forks source link

panic on govc ls network when nsx-t is installed #621

Closed mhagen-vmware closed 8 years ago

mhagen-vmware commented 8 years ago
anon@anon-Latitude-E7450:~$ govc ls network
panic: not implemented for type mo.OpaqueNetwork

goroutine 1 [running]:
panic(0xafa020, 0xc42033b6d0)
    /usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/vmware/govmomi/list.ToElement(0x7f4c2f0b2380, 0xc4203ea540, 0xc4203d63a0, 0x16, 0x1, 0xc4203e6340, 0x0, 0x1)
    /home/dougm/release/src/github.com/vmware/govmomi/list/lister.go:95 +0x2b9
github.com/vmware/govmomi/list.Lister.ListFolder(0xc420350660, 0xc42034f5a0, 0x6, 0xc420355c20, 0x11, 0xc4203d63a0, 0x16, 0x0, 0x1210720, 0xc4200122e8, ...)
    /home/dougm/release/src/github.com/vmware/govmomi/list/lister.go:250 +0x5ff
github.com/vmware/govmomi/list.Lister.List(0xc420350660, 0xc42034f5a0, 0x6, 0xc420355c20, 0x11, 0xc4203d63a0, 0x16, 0x0, 0x1210720, 0xc4200122e8, ...)
    /home/dougm/release/src/github.com/vmware/govmomi/list/lister.go:166 +0x25d
github.com/vmware/govmomi/list.Recurser.Recurse(0xc420350660, 0x100, 0x1210720, 0xc4200122e8, 0xc4203d63a0, 0x16, 0x7f4c2f02e0c8, 0xc420376680, 0xc420355590, 0x0, ...)
    /home/dougm/release/src/github.com/vmware/govmomi/list/recurser.go:64 +0x142
github.com/vmware/govmomi/list.Recurser.Recurse(0xc420350660, 0x1200100, 0x1210720, 0xc4200122e8, 0xc42033aed0, 0xe, 0x7f4c2f0b2330, 0xc42035bd00, 0xc420355590, 0x0, ...)
    /home/dougm/release/src/github.com/vmware/govmomi/list/recurser.go:88 +0x3b2
github.com/vmware/govmomi/find.(*Finder).find(0xc420350690, 0x1210720, 0xc4200122e8, 0xc4201d5c18, 0x1, 0x7ffecf2a2fc2, 0x7, 0xc420350690, 0x1210720, 0xc420012320, ...)
    /home/dougm/release/src/github.com/vmware/govmomi/find/finder.go:97 +0x5b5
github.com/vmware/govmomi/find.(*Finder).managedObjectList(0xc420350690, 0x1210720, 0xc4200122e8, 0x7ffecf2a2fc2, 0x7, 0x1205c01, 0xc420320500, 0xc420322640, 0x11, 0xc420322700, ...)
    /home/dougm/release/src/github.com/vmware/govmomi/find/finder.go:193 +0xe2
github.com/vmware/govmomi/find.(*Finder).ManagedObjectListChildren(0xc420350690, 0x1210720, 0xc4200122e8, 0x7ffecf2a2fc2, 0x7, 0xc4200001a0, 0x0, 0xc42001c180, 0xc420053d38, 0x4501a0)
    /home/dougm/release/src/github.com/vmware/govmomi/find/finder.go:243 +0x62
github.com/vmware/govmomi/govc/ls.(*ls).Run(0xc42000d9e0, 0x1210720, 0xc4200122e8, 0xc4200748a0, 0x0, 0x0)
    /home/dougm/release/src/github.com/vmware/govmomi/govc/ls/command.go:113 +0x16c
github.com/vmware/govmomi/govc/cli.Run(0xc42000c340, 0x2, 0x2, 0xc4200001a0)
    /home/dougm/release/src/github.com/vmware/govmomi/govc/cli/command.go:149 +0x586
main.main()
    /home/dougm/release/src/github.com/vmware/govmomi/govc/main.go:73 +0x66
dougm commented 8 years ago

Fixed in #622