compute

package
v1.5.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2019 License: Apache-2.0 Imports: 8 Imported by: 28

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VM

VM returns a slice of MoRefs that are the virtual machines of the provided resource pool

Types

type Cluster

type Cluster struct {
	*object.ClusterComputeResource
}

func NewCluster

func NewCluster(compute object.ComputeResource) *Cluster

func (*Cluster) DRSEnabled

func (c *Cluster) DRSEnabled(op trace.Operation) (bool, error)

DRSEnabled returns a bool indicating if DRS is enabled

type ResourcePool

type ResourcePool struct {
	*object.ResourcePool

	*session.Session
}

ResourcePool struct defines the ResourcePool which provides additional VIC specific methods over object.ResourcePool as well as keeps some state

func NewResourcePool

func NewResourcePool(ctx context.Context, session *session.Session, moref types.ManagedObjectReference) *ResourcePool

NewResourcePool returns a New ResourcePool object

func (*ResourcePool) GetChildVM

func (rp *ResourcePool) GetChildVM(ctx context.Context, name string) (*vm.VirtualMachine, error)

GetChildVM searches the pool for a VM by name and returns a VirtualMachine

func (*ResourcePool) GetChildrenVMs

func (rp *ResourcePool) GetChildrenVMs(op trace.Operation) ([]*vm.VirtualMachine, error)

GetChildrenVMs returns a slice of VirtualMachines that are the pools VMs

func (*ResourcePool) GetCluster

func (rp *ResourcePool) GetCluster(ctx context.Context) (*object.ComputeResource, error)

func (*ResourcePool) GetDatacenter

func (rp *ResourcePool) GetDatacenter(ctx context.Context) (*object.Datacenter, error)

type VirtualApp

type VirtualApp struct {
	*object.VirtualApp

	*session.Session
}

VirtualApp struct defines the VirtualApp which provides additional VIC specific methods over object.VirtualApp as well as keeps some state

func NewVirtualApp

func NewVirtualApp(ctx context.Context, session *session.Session, moref types.ManagedObjectReference) *VirtualApp

NewResourcePool returns a New ResourcePool object

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL