vsphere

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FirstBootDoneAnnotation = "virtualmachine.vmoperator.vmware.com/first-boot-done"
)
View Source
const (
	VsphereVMProviderName = "vsphere"
)

Variables

View Source
var SkipVMImageCLProviderCheck = false

SkipVMImageCLProviderCheck skips the checks that a VM Image has a provider and source, since a VM Image created for a VM template won't have either. This has been broken for a long time but was otherwise masked on how the tests used to be organized.

Functions

func AddInstanceStorageVolumes

func AddInstanceStorageVolumes(
	vmCtx context.VirtualMachineContext,
	vmClass *vmopv1alpha1.VirtualMachineClass) error

AddInstanceStorageVolumes checks if VM class is configured with instance volumes and appends the volumes to the VM's Spec if it was not already done.

func GetVMClassConfigSpec

func GetVMClassConfigSpec(raw json.RawMessage) (*types.VirtualMachineConfigSpec, error)

func GetVMMetadata

func GetVMMetadata(
	vmCtx context.VirtualMachineContext,
	k8sClient ctrlclient.Client) (vmMetadata, error)

func InitOvfCacheAndLockPool added in v1.8.1

func InitOvfCacheAndLockPool(expireAfter, checkExpireInterval time.Duration, maxItems int) (
	*util.Cache[VersionedOVFEnvelope], *util.LockPool[string, *sync.RWMutex])

InitOvfCacheAndLockPool initializes the ovf cache and lock pool that are used to cache the ovf envelope and lock the ovf envelope when it is being downloaded.

func ResVMToVirtualMachineImage

func ResVMToVirtualMachineImage(ctx goctx.Context, vm *object.VirtualMachine) (*v1alpha1.VirtualMachineImage, error)

ResVMToVirtualMachineImage isn't currently used.

Types

type VersionedOVFEnvelope added in v1.8.1

type VersionedOVFEnvelope struct {
	OvfEnvelope    *ovf.Envelope
	ContentVersion string
}

Jump to

Keyboard shortcuts

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