fake

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 11 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) ComputeCPUMinFrequency

func (s *VMProvider) ComputeCPUMinFrequency(ctx context.Context) 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) 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) GetItemFromLibraryByName

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

func (*VMProvider) GetTasksByActID

func (s *VMProvider) GetTasksByActID(ctx context.Context, 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) 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) IsVirtualMachineSetResourcePolicyReady

func (s *VMProvider) IsVirtualMachineSetResourcePolicyReady(ctx context.Context, azName string, resourcePolicy *vmopv1.VirtualMachineSetResourcePolicy) (bool, error)

func (*VMProvider) PublishVirtualMachine

func (*VMProvider) Reset

func (s *VMProvider) Reset()

func (*VMProvider) ResetVcClient

func (s *VMProvider) ResetVcClient(ctx context.Context)

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) 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