vmware

package
v0.76.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadGovcEnvVars

func LoadGovcEnvVars(vsphere types.Vsphere, vm *types.VM)

func NewVM

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

func NewVMwareCluster

func NewVMwareCluster(platform types.PlatformConfig) (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) CloneTemplate added in v0.21.1

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

CloneTemplate creates a new VM from a content library template

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) FindTemplate added in v0.21.1

func (s Session) FindTemplate(libraryName, nameOrID string) (*library.Item, error)

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