- Updated vmware/govmomi godep (Needs for vsan support)

- Fix unmount for vsanDatastore
- Add support for vsan datastore
This commit is contained in:
Abrar Shivani
2016-07-18 23:20:30 -07:00
parent 2301ab7e0e
commit 87e7535e94
31 changed files with 658 additions and 200 deletions

View File

@@ -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