Documentation ¶
Index ¶
- func EnterMaintenanceMode(host *object.HostSystem, timeout time.Duration, evacuate bool) error
- func ExitMaintenanceMode(host *object.HostSystem, timeout time.Duration) error
- func FromID(client *govmomi.Client, id string) (*object.HostSystem, error)
- func GetConnectionState(host *object.HostSystem) (types.HostSystemConnectionState, error)
- func HostInMaintenance(host *object.HostSystem) (bool, error)
- func NameOrID(client *govmomi.Client, id string) string
- func Properties(host *object.HostSystem) (*mo.HostSystem, error)
- func ResourcePool(host *object.HostSystem) (*object.ResourcePool, 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
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 time.Duration) error
ExitMaintenanceMode takes a host out of maintenance mode.
func GetConnectionState ¶ added in v1.21.0
func GetConnectionState(host *object.HostSystem) (types.HostSystemConnectionState, error)
GetConnectionState returns the host's connection state (see vim.HostSystem.ConnectionState)
func HostInMaintenance ¶ added in v1.21.0
func HostInMaintenance(host *object.HostSystem) (bool, error)
HostInMaintenance checks a HostSystem's maintenance mode and returns true if the the host is in 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 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.