client

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: Apache-2.0 Imports: 13 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) CreateVMSnapshot added in v0.3.0

func (r RichVmwareClient) CreateVMSnapshot(moRef string, name string, desc string, memory bool, quiesce bool) (*types.ManagedObjectReference, error)

CreateVMSnapshot creates a snapshot of the VM.

func (RichVmwareClient) FindVMSnapshot added in v0.3.0

func (r RichVmwareClient) FindVMSnapshot(moRef string, snapshot string) (*types.ManagedObjectReference, error)

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) RemoveVMSnapshot added in v0.3.0

func (r RichVmwareClient) RemoveVMSnapshot(moRef string, snapshot string, removeChildren bool, consolidate *bool) error

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