Update vmware/govmomi vendor: add vapi package
Zones implementation for vSphere cloud provider needs dependencies which are not included in current vmware/govmomi vendor. So this update added "vapi" package to support zones.
This commit is contained in:
13
vendor/github.com/vmware/govmomi/object/virtual_machine.go
generated
vendored
13
vendor/github.com/vmware/govmomi/object/virtual_machine.go
generated
vendored
@@ -799,3 +799,16 @@ func (v VirtualMachine) UpgradeVM(ctx context.Context, version string) (*Task, e
|
||||
|
||||
return NewTask(v.c, res.Returnval), nil
|
||||
}
|
||||
|
||||
// UUID is a helper to get the UUID of the VirtualMachine managed object.
|
||||
// This method returns an empty string if an error occurs when retrieving UUID from the VirtualMachine object.
|
||||
func (v VirtualMachine) UUID(ctx context.Context) string {
|
||||
var o mo.VirtualMachine
|
||||
|
||||
err := v.Properties(ctx, v.Reference(), []string{"config.uuid"}, &o)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return o.Config.Uuid
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user