fake

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetCreateOrUpdateFunction

func SetCreateOrUpdateFunction(
	ctx context.Context,
	provider *VMProvider,
	fn func(
		ctx context.Context,
		vm *vmopv1.VirtualMachine,
	) error,
)

Types

type VMProvider

type VMProvider struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewVMProvider

func NewVMProvider() *VMProvider

func (*VMProvider) AddToVMPublishMap

func (s *VMProvider) AddToVMPublishMap(actID string, result vimtypes.TaskInfoState)

func (*VMProvider) CleanupVirtualMachine added in v1.10.0

func (s *VMProvider) CleanupVirtualMachine(ctx context.Context, vm *vmopv1.VirtualMachine) error

func (*VMProvider) ComputeCPUMinFrequency

func (s *VMProvider) ComputeCPUMinFrequency(ctx context.Context) error

func (*VMProvider) ContainsExtraConfigEntry added in v1.10.0

func (s *VMProvider) ContainsExtraConfigEntry(ctx context.Context, objVM *object.VirtualMachine, key, value string) (bool, error)

func (*VMProvider) CreateOrUpdateVirtualMachine

func (s *VMProvider) CreateOrUpdateVirtualMachine(ctx context.Context, vm *vmopv1.VirtualMachine) error

func (*VMProvider) CreateOrUpdateVirtualMachineAsync

func (s *VMProvider) CreateOrUpdateVirtualMachineAsync(ctx context.Context, vm *vmopv1.VirtualMachine) (<-chan error, error)

func (*VMProvider) CreateOrUpdateVirtualMachineSetResourcePolicy

func (s *VMProvider) CreateOrUpdateVirtualMachineSetResourcePolicy(ctx context.Context, resourcePolicy *vmopv1.VirtualMachineSetResourcePolicy) error

func (*VMProvider) DeleteSnapshot added in v1.10.0

func (s *VMProvider) DeleteSnapshot(
	ctx context.Context,
	snapshot *vmopv1.VirtualMachineSnapshot,
	vm *vmopv1.VirtualMachine,
	removeChildren bool,
	consolidate *bool) (bool, error)

func (*VMProvider) DeleteVirtualMachine

func (s *VMProvider) DeleteVirtualMachine(ctx context.Context, vm *vmopv1.VirtualMachine) error

func (*VMProvider) DeleteVirtualMachineSetResourcePolicy

func (s *VMProvider) DeleteVirtualMachineSetResourcePolicy(ctx context.Context, resourcePolicy *vmopv1.VirtualMachineSetResourcePolicy) error

func (*VMProvider) DoesProfileSupportEncryption

func (s *VMProvider) DoesProfileSupportEncryption(
	ctx context.Context,
	profileID string) (bool, error)

func (*VMProvider) GetItemFromInventoryByName added in v1.10.0

func (s *VMProvider) GetItemFromInventoryByName(ctx context.Context, contentLibrary, itemName string) (object.Reference, error)

func (*VMProvider) GetItemFromLibraryByName

func (s *VMProvider) GetItemFromLibraryByName(ctx context.Context,
	contentLibrary, itemName string) (*library.Item, error)

func (*VMProvider) GetSnapshotSize added in v1.10.0

func (s *VMProvider) GetSnapshotSize(ctx context.Context, vmSnapshotName string, vm *vmopv1.VirtualMachine) (int64, error)

func (*VMProvider) GetStoragePolicyStatus added in v1.10.0

func (s *VMProvider) GetStoragePolicyStatus(
	ctx context.Context, profileID string) (infrav1.StoragePolicyStatus, error)

GetStoragePolicyStatus returns the status information for a given storage policy.

func (*VMProvider) GetTasksByActID

func (s *VMProvider) GetTasksByActID(ctx context.Context, vm *vmopv1.VirtualMachine, actID string) (tasksInfo []vimtypes.TaskInfo, retErr error)

func (*VMProvider) GetVMPublishRequestResult

func (s *VMProvider) GetVMPublishRequestResult(vmPub *vmopv1.VirtualMachinePublishRequest) vimtypes.TaskInfoState

func (*VMProvider) GetVMPublishRequestResultWithActIDLocked

func (s *VMProvider) GetVMPublishRequestResultWithActIDLocked(actID string) vimtypes.TaskInfoState

func (*VMProvider) GetVirtualMachineFiles added in v1.10.0

func (*VMProvider) GetVirtualMachineGuestHeartbeat

func (s *VMProvider) GetVirtualMachineGuestHeartbeat(ctx context.Context, vm *vmopv1.VirtualMachine) (vmopv1.GuestHeartbeatStatus, error)

func (*VMProvider) GetVirtualMachineHardwareVersion

func (s *VMProvider) GetVirtualMachineHardwareVersion(ctx context.Context, vm *vmopv1.VirtualMachine) (vimtypes.HardwareVersion, error)

func (*VMProvider) GetVirtualMachineProperties

func (s *VMProvider) GetVirtualMachineProperties(
	ctx context.Context,
	vm *vmopv1.VirtualMachine,
	propertyPaths []string) (map[string]any, error)

func (*VMProvider) GetVirtualMachineWebMKSTicket

func (s *VMProvider) GetVirtualMachineWebMKSTicket(ctx context.Context, vm *vmopv1.VirtualMachine, pubKey string) (string, error)

func (*VMProvider) IsPublishVMCalled

func (s *VMProvider) IsPublishVMCalled() bool

func (*VMProvider) PlaceVirtualMachineGroup added in v1.10.0

func (s *VMProvider) PlaceVirtualMachineGroup(ctx context.Context, group *vmopv1.VirtualMachineGroup, groupPlacements []providers.VMGroupPlacement) error

func (*VMProvider) PublishVirtualMachine

func (*VMProvider) Reset

func (s *VMProvider) Reset()

func (*VMProvider) SyncVMSnapshotTreeStatus added in v1.10.0

func (s *VMProvider) SyncVMSnapshotTreeStatus(ctx context.Context, vm *vmopv1.VirtualMachine) error

func (*VMProvider) SyncVirtualMachineImage

func (s *VMProvider) SyncVirtualMachineImage(ctx context.Context, cli, vmi client.Object) error

func (*VMProvider) UpdateContentLibraryItem

func (s *VMProvider) UpdateContentLibraryItem(ctx context.Context, itemID, newName string, newDescription *string) error

func (*VMProvider) UpdateVcCreds added in v1.10.0

func (s *VMProvider) UpdateVcCreds(ctx context.Context, data map[string][]byte) error

func (*VMProvider) UpdateVcPNID

func (s *VMProvider) UpdateVcPNID(ctx context.Context, vcPNID, vcPort string) error

func (*VMProvider) VSphereClient

func (s *VMProvider) VSphereClient(ctx context.Context) (*vsclient.Client, error)

Jump to

Keyboard shortcuts

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