- Updated vmware/govmomi godep (Needs for vsan support)
- Fix unmount for vsanDatastore - Add support for vsan datastore
This commit is contained in:
21
vendor/github.com/vmware/govmomi/object/virtual_machine.go
generated
vendored
21
vendor/github.com/vmware/govmomi/object/virtual_machine.go
generated
vendored
@@ -18,7 +18,6 @@ package object
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
|
||||
"github.com/vmware/govmomi/property"
|
||||
@@ -35,15 +34,6 @@ const (
|
||||
|
||||
type VirtualMachine struct {
|
||||
Common
|
||||
|
||||
InventoryPath string
|
||||
}
|
||||
|
||||
func (v VirtualMachine) String() string {
|
||||
if v.InventoryPath == "" {
|
||||
return v.Common.String()
|
||||
}
|
||||
return fmt.Sprintf("%v @ %v", v.Common, v.InventoryPath)
|
||||
}
|
||||
|
||||
func NewVirtualMachine(c *vim25.Client, ref types.ManagedObjectReference) *VirtualMachine {
|
||||
@@ -52,17 +42,6 @@ func NewVirtualMachine(c *vim25.Client, ref types.ManagedObjectReference) *Virtu
|
||||
}
|
||||
}
|
||||
|
||||
func (v VirtualMachine) Name(ctx context.Context) (string, error) {
|
||||
var o mo.VirtualMachine
|
||||
|
||||
err := v.Properties(ctx, v.Reference(), []string{"name"}, &o)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return o.Name, nil
|
||||
}
|
||||
|
||||
func (v VirtualMachine) PowerState(ctx context.Context) (types.VirtualMachinePowerState, error) {
|
||||
var o mo.VirtualMachine
|
||||
|
||||
|
||||
Reference in New Issue
Block a user