Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTooManyCreates is returned from the CreateOrUpdateVirtualMachine and // CreateOrUpdateVirtualMachineAsync functions when the number of create // threads/goroutines have reached the allowed limit. ErrTooManyCreates = errors.New("too many creates") // ErrReconcileInProgress is returned from the // CreateOrUpdateVirtualMachine and DeleteVirtualMachine functions when // the VM is still being reconciled in a background thread. ErrReconcileInProgress = errors.New("reconcile already in progress") )
Functions ¶
This section is empty.
Types ¶
type VMGroupPlacement ¶ added in v1.10.0
type VMGroupPlacement struct {
VMGroup *vmopv1.VirtualMachineGroup
VMMembers []*vmopv1.VirtualMachine
}
type VirtualMachineProviderInterface ¶
type VirtualMachineProviderInterface interface {
CreateOrUpdateVirtualMachine(ctx context.Context, vm *vmopv1.VirtualMachine) error
CreateOrUpdateVirtualMachineAsync(ctx context.Context, vm *vmopv1.VirtualMachine) (<-chan error, error)
DeleteVirtualMachine(ctx context.Context, vm *vmopv1.VirtualMachine) error
// CleanupVirtualMachine removes all VM Operator modifications from a vCenter VM
// without deleting it. This is used when a VM has the skip-delete-platform-resource
// annotation to ensure the vCenter VM is left in a clean state.
CleanupVirtualMachine(ctx context.Context, vm *vmopv1.VirtualMachine) error
PublishVirtualMachine(ctx context.Context, vm *vmopv1.VirtualMachine,
vmPub *vmopv1.VirtualMachinePublishRequest, cl *imgregv1a1.ContentLibrary, actID string) (string, error)
GetVirtualMachineGuestHeartbeat(ctx context.Context, vm *vmopv1.VirtualMachine) (vmopv1.GuestHeartbeatStatus, error)
GetVirtualMachineProperties(ctx context.Context, vm *vmopv1.VirtualMachine, propertyPaths []string) (map[string]any, error)
GetVirtualMachineFiles(ctx context.Context, vm *vmopv1.VirtualMachine) ([]vimtypes.VirtualMachineFileLayoutExFileInfo, error)
GetVirtualMachineWebMKSTicket(ctx context.Context, vm *vmopv1.VirtualMachine, pubKey string) (string, error)
GetVirtualMachineHardwareVersion(ctx context.Context, vm *vmopv1.VirtualMachine) (vimtypes.HardwareVersion, error)
PlaceVirtualMachineGroup(ctx context.Context, group *vmopv1.VirtualMachineGroup, groupPlacements []VMGroupPlacement) error
CreateOrUpdateVirtualMachineSetResourcePolicy(ctx context.Context, resourcePolicy *vmopv1.VirtualMachineSetResourcePolicy) error
DeleteVirtualMachineSetResourcePolicy(ctx context.Context, resourcePolicy *vmopv1.VirtualMachineSetResourcePolicy) error
// "Infra" related
UpdateVcPNID(ctx context.Context, vcPNID, vcPort string) error
UpdateVcCreds(ctx context.Context, data map[string][]byte) error
ComputeCPUMinFrequency(ctx context.Context) error
GetItemFromLibraryByName(ctx context.Context, contentLibrary, itemName string) (*library.Item, error)
GetItemFromInventoryByName(ctx context.Context, contentLibrary, itemName string) (object.Reference, error)
ContainsExtraConfigEntry(ctx context.Context, objVM *object.VirtualMachine, key, value string) (bool, error)
UpdateContentLibraryItem(ctx context.Context, itemID, newName string, newDescription *string) error
SyncVirtualMachineImage(ctx context.Context, cli, vmi ctrlclient.Object) error
GetTasksByActID(ctx context.Context, vm *vmopv1.VirtualMachine, actID string) (tasksInfo []vimtypes.TaskInfo, retErr error)
// DoesProfileSupportEncryption returns true if the specified profile
// supports encryption by checking whether or not the underlying policy
// contains any IOFILTERs.
DoesProfileSupportEncryption(ctx context.Context, profileID string) (bool, error)
// GetStoragePolicyStatus returns the status information for a given
// storage policy.
GetStoragePolicyStatus(ctx context.Context, profileID string) (infrav1.StoragePolicyStatus, error)
// VSphereClient returns the provider's vSphere client.
VSphereClient(context.Context) (*client.Client, error)
// DeleteSnapshot deletes a snapshot from a virtual machine.
DeleteSnapshot(ctx context.Context, vmSnapshot *vmopv1.VirtualMachineSnapshot,
vm *vmopv1.VirtualMachine, removeChildren bool, consolidate *bool) (bool, error)
// GetSnapshotSize returns the size of a snapshot.
GetSnapshotSize(ctx context.Context, vmSnapshotName string, vm *vmopv1.VirtualMachine) (int64, error)
// SyncVMSnapshotTreeStatus syncs the VM's current and root snapshots status.
SyncVMSnapshotTreeStatus(ctx context.Context, vm *vmopv1.VirtualMachine) error
}
VirtualMachineProviderInterface is a pluggable interface for VM Providers.
Click to show internal directories.
Click to hide internal directories.