Documentation ¶
Index ¶
- Constants
- func NewClusterContext(ctx *context.ControllerContext) *context.ClusterContext
- func NewControllerContext(ctx *context.ControllerManagerContext) *context.ControllerContext
- func NewControllerManagerContext(initObjects ...client.Object) *context.ControllerManagerContext
- func NewFakeGuestClusterClient(initObjects ...client.Object) client.Client
- func NewGuestClusterContext(ctx *vmware.ClusterContext, prototypeCluster bool, ...) *vmware.GuestClusterContext
- func NewMachineContext(ctx *context.ClusterContext) *context.VIMMachineContext
- func NewVMContext(ctx *context.ControllerContext) *context.VMContext
- func NewVSphereCluster(namespace string) vmwarev1.VSphereCluster
- func NewVmwareClusterContext(ctx *context.ControllerContext, namespace string, ...) *vmware.ClusterContext
Constants ¶
View Source
const ( // ControllerName is the name of the fake controller. ControllerName = "fake-controller" // ControllerManagerName is the name of the fake controller manager. ControllerManagerName = "fake-controller-manager" // ControllerManagerNamespace is the name of the namespace in which the // fake controller manager's resources are located. ControllerManagerNamespace = "fake-capv-system" // LeaderElectionNamespace is the namespace used to control leader election // for the fake controller manager. LeaderElectionNamespace = ControllerManagerNamespace // LeaderElectionID is the name of the ID used to control leader election // for the fake controller manager. LeaderElectionID = ControllerManagerName + "-runtime" // Namespace is the fake namespace. Namespace = "default" // ClusterUUID is the UID of the fake CAPI cluster. ClusterUUID = "00000000-0000-0000-0000-000000000002" // Clusterv1a2Name is the name of the fake CAPI v1alpha3 Cluster resource. Clusterv1a2Name = "fake-cluster" // Clusterv1a2UUID is the UID of the fake CAPI v1alpha3 Cluster resource. Clusterv1a2UUID = "00000000-0000-0000-0000-000000000000" // Machinev1a2Name is the name of the fake CAPI v1alpha3 Machine resource. Machinev1a2Name = "fake-machine" // Machinev1a2UUID is the UID of the fake CAPI v1alpha3 Machine resource. Machinev1a2UUID = "00000000-0000-0000-0000-000000000001" VSphereClusterName = "fake-vsphere-cluster" // VSphereClusterUUID is the UID of the fake VSphereCluster resource. VSphereClusterUUID = "10000000-0000-0000-0000-000000000000" // VSphereMachineUUID is the UID of the fake VSphereMachine resource. VSphereMachineUUID = "10000000-0000-0000-0000-000000000001" // VSphereVMName is the name of the fake VSphereVM resource. VSphereVMName = "fake-vm" // VSphereVMUUID is the UID of the fake VSphereVMUUID resource. VSphereVMUUID = "20000000-0000-0000-0000-000000000002" // PodCIDR is the CIDR for the pod network. PodCIDR = "1.0.0.0/16" // ServiceCIDR is the CIDR for the service network. ServiceCIDR = "2.0.0.0/16" VCenterURL = "foo.vcenter.com" )
Variables ¶
This section is empty.
Functions ¶
func NewClusterContext ¶
func NewClusterContext(ctx *context.ControllerContext) *context.ClusterContext
NewClusterContext returns a fake ClusterContext for unit testing reconcilers with a fake client.
func NewControllerContext ¶
func NewControllerContext(ctx *context.ControllerManagerContext) *context.ControllerContext
NewControllerContext returns a fake ControllerContext for unit testing reconcilers with a fake client.
func NewControllerManagerContext ¶
func NewControllerManagerContext(initObjects ...client.Object) *context.ControllerManagerContext
func NewFakeGuestClusterClient ¶ added in v1.1.0
func NewGuestClusterContext ¶ added in v1.1.0
func NewGuestClusterContext(ctx *vmware.ClusterContext, prototypeCluster bool, gcInitObjects ...client.Object) *vmware.GuestClusterContext
NewGuestClusterContext returns a fake GuestClusterContext for unit testing guest cluster controllers with a fake client.
func NewMachineContext ¶
func NewMachineContext(ctx *context.ClusterContext) *context.VIMMachineContext
NewMachineContext returns a fake VIMMachineContext for unit testing reconcilers with a fake client.
func NewVMContext ¶ added in v0.6.0
func NewVMContext(ctx *context.ControllerContext) *context.VMContext
NewVMContext returns a fake VMContext for unit testing reconcilers with a fake client.
func NewVSphereCluster ¶ added in v1.1.0
func NewVSphereCluster(namespace string) vmwarev1.VSphereCluster
func NewVmwareClusterContext ¶ added in v1.1.0
func NewVmwareClusterContext(ctx *context.ControllerContext, namespace string, vsphereCluster *infrav1.VSphereCluster) *vmware.ClusterContext
NewVmwareClusterContext returns a fake ClusterContext for unit testing reconcilers with a fake client.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.