vmware

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package vmware contains fake contexts used for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterContext

type ClusterContext struct {
	Cluster        *clusterv1.Cluster
	VSphereCluster *vmwarev1.VSphereCluster
	PatchHelper    *patch.Helper
}

ClusterContext is a Go context used with a CAPI cluster.

func (*ClusterContext) Patch

func (c *ClusterContext) Patch(ctx context.Context) error

Patch updates the object and its status on the API server.

func (*ClusterContext) String

func (c *ClusterContext) String() string

String returns ClusterAPIVersion/ClusterNamespace/ClusterName.

type GuestClusterContext

type GuestClusterContext struct {
	*ClusterContext

	// GuestClient can be used to access the guest cluster.
	GuestClient client.Client
}

GuestClusterContext is the context used for GuestClusterControllers.

func (*GuestClusterContext) String

func (c *GuestClusterContext) String() string

String returns ClusterGroupVersionKind ClusterNamespace/ClusterName.

type SupervisorMachineContext

type SupervisorMachineContext struct {
	*capvcontext.BaseMachineContext
	VSphereCluster *vmwarev1.VSphereCluster
	VSphereMachine *vmwarev1.VSphereMachine
	VMModifiers    []VMModifier
}

SupervisorMachineContext is a Go capvcontext used with a VSphereMachine.

func (*SupervisorMachineContext) GetClusterContext added in v1.3.0

func (c *SupervisorMachineContext) GetClusterContext() *ClusterContext

GetClusterContext returns the Cluster and VSphereCluster from the SupervisorMachineContext.

func (*SupervisorMachineContext) GetObjectMeta

func (c *SupervisorMachineContext) GetObjectMeta() metav1.ObjectMeta

GetObjectMeta returns the metadata for the VSphereMachine from the SupervisorMachineContext.

func (*SupervisorMachineContext) GetVSphereMachine

func (c *SupervisorMachineContext) GetVSphereMachine() capvcontext.VSphereMachine

GetVSphereMachine returns the VSphereMachine from the SupervisorMachineContext.

func (*SupervisorMachineContext) Patch

Patch updates the object and its status on the API server.

func (*SupervisorMachineContext) SetBaseMachineContext

func (c *SupervisorMachineContext) SetBaseMachineContext(base *capvcontext.BaseMachineContext)

SetBaseMachineContext sets the BaseMachineContext for the SupervisorMachineContext.

func (*SupervisorMachineContext) String

func (c *SupervisorMachineContext) String() string

String returns VSphereMachineGroupVersionKind VSphereMachineNamespace/VSphereMachineName.

type VMModifier

type VMModifier func(runtime.Object) (runtime.Object, error)

VMModifier allows a function to be passed to VM creation to modify its spec The hook is loosely typed so as to allow for different VirtualMachine backends.

Jump to

Keyboard shortcuts

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