Documentation ¶
Index ¶
- func EnterMaintenanceMode(host *object.HostSystem, timeout int, evacuate bool) error
- func ExitMaintenanceMode(host *object.HostSystem, timeout int) error
- func FromID(client *govmomi.Client, id string) (*object.HostSystem, error)
- func NameOrID(client *govmomi.Client, id string) string
- func Properties(host *object.HostSystem) (*mo.HostSystem, error)
- func SystemOrDefault(client *govmomi.Client, name string, dc *object.Datacenter) (*object.HostSystem, error)
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 NameOrID ¶
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 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.