vmware

package
v0.13.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadGovcEnvVars

func LoadGovcEnvVars(vm *types.VM)

func NewVM

func NewVM(ctx context.Context, dryRun bool, obj *object.VirtualMachine) types.Machine

func NewVMwareCluster

func NewVMwareCluster(prefix string) (types.Cluster, error)

NewVMwareCluster opens a new vmware session using environment variables

Types

type Session

type Session struct {
	logger.Logger
	*govmomi.Client
	Finder *find.Finder
	// contains filtered or unexported fields
}

Session is a vSphere session with a configured Finder.

func GetOrCreateCachedSession

func GetOrCreateCachedSession(datacenter, user, pass, vcenter string) (*Session, error)

func GetSessionFromEnv

func GetSessionFromEnv() (*Session, error)

func (Session) Clone

func (s Session) Clone(vm ptypes.VM, config *konfigadm.Config) (*object.VirtualMachine, error)

Clone kicks off a clone operation on vCenter to create a new virtual machine.

func (*Session) FindByInstanceUUID

func (s *Session) FindByInstanceUUID(ctx context.Context, uuid string) (object.Reference, error)

FindByInstanceUUID finds an object by its instance UUID.

func (*Session) FindByUUID

func (s *Session) FindByUUID(ctx context.Context, uuid string) (object.Reference, error)

FindByUUID finds an object by its UUID.

func (Session) FindVM

func (s Session) FindVM(nameOrID string) (*object.VirtualMachine, error)

FindVM finds a template based either on a UUID or name.

func (Session) GetVMs

func (s Session) GetVMs(ctx context.Context, prefix string, vm *types.VM) ([]*object.VirtualMachine, error)

Jump to

Keyboard shortcuts

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