resourcepool

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2019 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create added in v1.6.0

Create creates a ResourcePool.

func DefaultDevices

func DefaultDevices(client *govmomi.Client, pool *object.ResourcePool, guest string) (object.VirtualDeviceList, error)

DefaultDevices loads a default VirtualDeviceList for a supplied pool and guest ID (guest OS type).

func Delete added in v1.6.0

func Delete(rp *object.ResourcePool) error

Delete destroys a ResourcePool.

func FromID

func FromID(client *govmomi.Client, id string) (*object.ResourcePool, error)

FromID locates a ResourcePool by its managed object reference ID.

func FromPathOrDefault

func FromPathOrDefault(client *govmomi.Client, name string, dc *object.Datacenter) (*object.ResourcePool, error)

FromPathOrDefault returns a ResourcePool via its supplied path.

func HasChildren added in v1.6.0

func HasChildren(rp *object.ResourcePool) (bool, error)

HasChildren checks to see if a resource pool has any child items (virtual machines, vApps, or resource pools) and returns true if that is the case. This is useful when checking to see if a resource pool is safe to delete. Destroying a resource pool in vSphere destroys *all* children if at all possible, so extra verification is necessary to prevent accidental removal.

func MoveIntoResourcePool added in v1.6.0

func MoveIntoResourcePool(p *object.ResourcePool, c types.ManagedObjectReference) error

MoveIntoResourcePool moves a virtual machine, resource pool, or vApp into the specified ResourcePool.

func OSFamily

func OSFamily(client *govmomi.Client, pool *object.ResourcePool, guest string) (string, error)

OSFamily uses the resource pool's environment browser to get the OS family for a specific guest ID.

func Properties

func Properties(obj *object.ResourcePool) (*mo.ResourcePool, error)

Properties returns the ResourcePool managed object from its higher-level object.

func Update added in v1.6.0

func Update(rp *object.ResourcePool, name string, spec *types.ResourceConfigSpec) error

Update updates a ResourcePool.

func ValidateHost

func ValidateHost(client *govmomi.Client, pool *object.ResourcePool, host *object.HostSystem) error

ValidateHost checks to see if a HostSystem is a member of a ResourcePool through cluster membership, or if the HostSystem ID matches the ID of a standalone host ComputeResource. An error is returned if it is not a member of the cluster to which the resource pool belongs, or if there was some sort of other error with checking.

This is used as an extra validation before a VM creation happens, or vMotion to a specific host is attempted.

Types

This section is empty.

Jump to

Keyboard shortcuts

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