clustermodules

package
v1.8.6 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClaimClusterModuleUUID

func ClaimClusterModuleUUID(
	ctx context.Context,
	clusterModProvider Provider,
	groupName string,
	clusterRef types.ManagedObjectReference,
	resourcePolicy *vmopv1.VirtualMachineSetResourcePolicy) (int, string, error)

ClaimClusterModuleUUID tries to find an existing entry in the Status.ClusterModules that is for the given groupName and cluster reference. This is meant for after an upgrade where the FaultDomains FSS is now enabled but we had not previously set the ClusterMoID.

func FindClusterModuleUUID

func FindClusterModuleUUID(
	ctx context.Context,
	groupName string,
	clusterRef types.ManagedObjectReference,
	resourcePolicy *vmopv1.VirtualMachineSetResourcePolicy) (int, string)

FindClusterModuleUUID returns the index in the Status.ClusterModules and UUID of the VC cluster module for the given groupName and cluster reference.

Types

type Provider

type Provider interface {
	CreateModule(ctx context.Context, clusterRef types.ManagedObjectReference) (string, error)
	DeleteModule(ctx context.Context, moduleID string) error
	DoesModuleExist(ctx context.Context, moduleID string, cluster types.ManagedObjectReference) (bool, error)

	IsMoRefModuleMember(ctx context.Context, moduleID string, moRef types.ManagedObjectReference) (bool, error)
	AddMoRefToModule(ctx context.Context, moduleID string, moRef types.ManagedObjectReference) error
	RemoveMoRefFromModule(ctx context.Context, moduleID string, moRef types.ManagedObjectReference) error
}

func NewProvider

func NewProvider(restClient *rest.Client) Provider

Jump to

Keyboard shortcuts

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