client

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RichVmwareClient

type RichVmwareClient struct {
	// contains filtered or unexported fields
}

RichVmwareClient is responsible for retrieving VM data from the VMware API.

func NewRichVMWareClient

func NewRichVMWareClient(apiUrl, username, password string, thumbprint string) (*RichVmwareClient, error)

NewRichVMWareClient creates a new, connected rich VMWare client.

func (RichVmwareClient) Close

func (r RichVmwareClient) Close() error

Close logs out and shuts down idle connections.

func (RichVmwareClient) GetVM

func (r RichVmwareClient) GetVM(id *string, name *string, _ *string, _ *string) (interface{}, error)

GetVM retrieves a VM from a vCenter or ESXI host by UUID or by name/inventory path.

func (RichVmwareClient) GetVMHostProperties

func (r RichVmwareClient) GetVMHostProperties(vm *object.VirtualMachine) (*mo.HostSystem, error)

GetVMHostProperties retrieves the Properties struct for the HostSystem the VM is on.

func (RichVmwareClient) GetVMProperties

func (r RichVmwareClient) GetVMProperties(vm *object.VirtualMachine) (*mo.VirtualMachine, error)

GetVMProperties retrieves the Properties struct for the VM.

func (RichVmwareClient) StartVM

func (r RichVmwareClient) StartVM(moRef string) error

StartVM requests VM start and doesn't wait for it to complete.

func (RichVmwareClient) StopVM

func (r RichVmwareClient) StopVM(moRef string) error

StopVM stops the VM and waits for the vm to be stopped.

func (RichVmwareClient) TestConnection

func (r RichVmwareClient) TestConnection() error

TestConnection checks the connectivity to the vCenter or ESXi host.

Jump to

Keyboard shortcuts

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