diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 3f0ea9b1b..500628ca2 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "github.com/hashicorp/terraform", "GoVersion": "go1.6", - "GodepVersion": "v63", + "GodepVersion": "v62", "Packages": [ "./..." ], @@ -1266,78 +1266,78 @@ }, { "ImportPath": "github.com/vmware/govmomi", - "Comment": "v0.6.1", - "Rev": "18154e511bc8f6bc1fffe2e47d11ef4f1931a044" + "Comment": "v0.6.2", + "Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a" }, { "ImportPath": "github.com/vmware/govmomi/find", - "Comment": "v0.6.1", - "Rev": "18154e511bc8f6bc1fffe2e47d11ef4f1931a044" + "Comment": "v0.6.2", + "Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a" }, { "ImportPath": "github.com/vmware/govmomi/list", - "Comment": "v0.6.1", - "Rev": "18154e511bc8f6bc1fffe2e47d11ef4f1931a044" + "Comment": "v0.6.2", + "Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a" }, { "ImportPath": "github.com/vmware/govmomi/object", - "Comment": "v0.6.1", - "Rev": "18154e511bc8f6bc1fffe2e47d11ef4f1931a044" + "Comment": "v0.6.2", + "Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a" }, { "ImportPath": "github.com/vmware/govmomi/property", - "Comment": "v0.6.1", - "Rev": "18154e511bc8f6bc1fffe2e47d11ef4f1931a044" + "Comment": "v0.6.2", + "Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a" }, { "ImportPath": "github.com/vmware/govmomi/session", - "Comment": "v0.6.1", - "Rev": "18154e511bc8f6bc1fffe2e47d11ef4f1931a044" + "Comment": "v0.6.2", + "Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a" }, { "ImportPath": "github.com/vmware/govmomi/task", - "Comment": "v0.6.1", - "Rev": "18154e511bc8f6bc1fffe2e47d11ef4f1931a044" + "Comment": "v0.6.2", + "Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a" }, { "ImportPath": "github.com/vmware/govmomi/vim25", - "Comment": "v0.6.1", - "Rev": "18154e511bc8f6bc1fffe2e47d11ef4f1931a044" + "Comment": "v0.6.2", + "Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a" }, { "ImportPath": "github.com/vmware/govmomi/vim25/debug", - "Comment": "v0.6.1", - "Rev": "18154e511bc8f6bc1fffe2e47d11ef4f1931a044" + "Comment": "v0.6.2", + "Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a" }, { "ImportPath": "github.com/vmware/govmomi/vim25/methods", - "Comment": "v0.6.1", - "Rev": "18154e511bc8f6bc1fffe2e47d11ef4f1931a044" + "Comment": "v0.6.2", + "Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a" }, { "ImportPath": "github.com/vmware/govmomi/vim25/mo", - "Comment": "v0.6.1", - "Rev": "18154e511bc8f6bc1fffe2e47d11ef4f1931a044" + "Comment": "v0.6.2", + "Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a" }, { "ImportPath": "github.com/vmware/govmomi/vim25/progress", - "Comment": "v0.6.1", - "Rev": "18154e511bc8f6bc1fffe2e47d11ef4f1931a044" + "Comment": "v0.6.2", + "Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a" }, { "ImportPath": "github.com/vmware/govmomi/vim25/soap", - "Comment": "v0.6.1", - "Rev": "18154e511bc8f6bc1fffe2e47d11ef4f1931a044" + "Comment": "v0.6.2", + "Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a" }, { "ImportPath": "github.com/vmware/govmomi/vim25/types", - "Comment": "v0.6.1", - "Rev": "18154e511bc8f6bc1fffe2e47d11ef4f1931a044" + "Comment": "v0.6.2", + "Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a" }, { "ImportPath": "github.com/vmware/govmomi/vim25/xml", - "Comment": "v0.6.1", - "Rev": "18154e511bc8f6bc1fffe2e47d11ef4f1931a044" + "Comment": "v0.6.2", + "Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a" }, { "ImportPath": "github.com/xanzy/go-cloudstack/cloudstack", diff --git a/vendor/github.com/vmware/govmomi/CHANGELOG.md b/vendor/github.com/vmware/govmomi/CHANGELOG.md index b21ed71e3..c695d4a1a 100644 --- a/vendor/github.com/vmware/govmomi/CHANGELOG.md +++ b/vendor/github.com/vmware/govmomi/CHANGELOG.md @@ -1,5 +1,13 @@ # changelog +### 0.6.2 (2016-05-11) + +* Get complete file details in Datastore.Stat + +* SOAP decoding fixes + +* Add VirtualMachine.RemoveAllSnapshot + ### 0.6.1 (2016-04-30) * Fix mo.Entity interface diff --git a/vendor/github.com/vmware/govmomi/CONTRIBUTORS b/vendor/github.com/vmware/govmomi/CONTRIBUTORS index c6d83e756..11b219436 100644 --- a/vendor/github.com/vmware/govmomi/CONTRIBUTORS +++ b/vendor/github.com/vmware/govmomi/CONTRIBUTORS @@ -7,6 +7,7 @@ Alvaro Miranda Amit Bathla Andrew Chin Arran Walker +Austin Parker Bob Killen Bruce Downs Clint Greenwood diff --git a/vendor/github.com/vmware/govmomi/object/datastore.go b/vendor/github.com/vmware/govmomi/object/datastore.go index 14399d026..123dde8a8 100644 --- a/vendor/github.com/vmware/govmomi/object/datastore.go +++ b/vendor/github.com/vmware/govmomi/object/datastore.go @@ -314,8 +314,10 @@ func (d Datastore) Stat(ctx context.Context, file string) (types.BaseFileInfo, e spec := types.HostDatastoreBrowserSearchSpec{ Details: &types.FileQueryFlags{ - FileType: true, - FileOwner: types.NewBool(true), // TODO: omitempty is generated, but seems to be required + FileType: true, + FileSize: true, + Modification: true, + FileOwner: types.NewBool(true), }, MatchPattern: []string{path.Base(file)}, } diff --git a/vendor/github.com/vmware/govmomi/object/virtual_machine.go b/vendor/github.com/vmware/govmomi/object/virtual_machine.go index 400fb6163..4faeae75e 100644 --- a/vendor/github.com/vmware/govmomi/object/virtual_machine.go +++ b/vendor/github.com/vmware/govmomi/object/virtual_machine.go @@ -476,6 +476,21 @@ func (v VirtualMachine) CreateSnapshot(ctx context.Context, name string, descrip return NewTask(v.c, res.Returnval), nil } +// RemoveAllSnapshot removes all snapshots of a virtual machine +func (v VirtualMachine) RemoveAllSnapshot(ctx context.Context, consolidate *bool) (*Task, error) { + req := types.RemoveAllSnapshots_Task{ + This: v.Reference(), + Consolidate: consolidate, + } + + res, err := methods.RemoveAllSnapshots_Task(ctx, v.c, &req) + if err != nil { + return nil, err + } + + return NewTask(v.c, res.Returnval), nil +} + // RevertToSnapshot reverts to a named snapshot func (v VirtualMachine) RevertToSnapshot(ctx context.Context, name string, suppressPowerOn bool) (*Task, error) { var o mo.VirtualMachine diff --git a/vendor/github.com/vmware/govmomi/vim25/mo/type_info.go b/vendor/github.com/vmware/govmomi/vim25/mo/type_info.go index 119d23740..0c9e5b034 100644 --- a/vendor/github.com/vmware/govmomi/vim25/mo/type_info.go +++ b/vendor/github.com/vmware/govmomi/vim25/mo/type_info.go @@ -189,12 +189,20 @@ func assignValue(val reflect.Value, fi []int, pv reflect.Value) { npv := reflect.New(pt) npv.Elem().Set(pv) pv = npv + pt = pv.Type() } else { panic(fmt.Sprintf("type %s doesn't implement %s", pt.Name(), rt.Name())) } } - rv.Set(pv) + if pt.AssignableTo(rt) { + rv.Set(pv) + } else if rt.ConvertibleTo(pt) { + rv.Set(pv.Convert(rt)) + } else { + panic(fmt.Sprintf("cannot assign %s (%s) to %s (%s)", rt.Name(), rt.Kind(), pt.Name(), pt.Kind())) + } + return } diff --git a/vendor/github.com/vmware/govmomi/vim25/xml/read.go b/vendor/github.com/vmware/govmomi/vim25/xml/read.go index 12a0ce270..5b407b790 100644 --- a/vendor/github.com/vmware/govmomi/vim25/xml/read.go +++ b/vendor/github.com/vmware/govmomi/vim25/xml/read.go @@ -271,9 +271,19 @@ var ( // Find reflect.Type for an element's type attribute. func (p *Decoder) typeForElement(val reflect.Value, start *StartElement) reflect.Type { t := "" - for _, a := range start.Attr { + for i, a := range start.Attr { if a.Name == xmlSchemaInstance { t = a.Value + // HACK: ensure xsi:type is last in the list to avoid using that value for + // a "type" attribute, such as ManagedObjectReference.Type for example. + // Note that xsi:type is already the last attribute in VC/ESX responses. + // This is only an issue with govmomi simulator generated responses. + // Proper fix will require finding a few needles in this xml package haystack. + x := len(start.Attr) - 1 + if i != x { + start.Attr[i] = start.Attr[x] + start.Attr[x] = a + } break } }