hostsystem

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2018 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnterMaintenanceMode added in v1.5.0

func EnterMaintenanceMode(host *object.HostSystem, timeout int, evacuate bool) error

EnterMaintenanceMode puts a host into maintenance mode. If evacuate is set to true, all powered off VMs will be removed from the host, or the task will block until this is the case, depending on whether or not DRS is on or off for the host's cluster. This parameter is ignored on direct ESXi.

func ExitMaintenanceMode added in v1.5.0

func ExitMaintenanceMode(host *object.HostSystem, timeout int) error

ExitMaintenanceMode takes a host out of maintenance mode.

func FromID

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

FromID locates a HostSystem by its managed object reference ID.

func NameOrID

func NameOrID(client *govmomi.Client, id string) string

NameOrID is a convenience method mainly for helping displaying friendly errors where space is important - it displays either the host name or the ID if there was an error fetching it.

func Properties added in v1.5.0

func Properties(host *object.HostSystem) (*mo.HostSystem, error)

Properties is a convenience method that wraps fetching the HostSystem MO from its higher-level object.

func ResourcePool added in v1.6.0

func ResourcePool(host *object.HostSystem) (*object.ResourcePool, error)

ResourcePool is a convenience method that wraps fetching the host system's root resource pool

func SystemOrDefault

func SystemOrDefault(client *govmomi.Client, name string, dc *object.Datacenter) (*object.HostSystem, error)

SystemOrDefault returns a HostSystem from a specific host name and datacenter. If the user is connecting over ESXi, the default host system is used.

Types

This section is empty.

Jump to

Keyboard shortcuts

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