Documentation ¶
Index ¶
- Constants
- func DummyClusterContentLibraryItem(name string) *imgregv1a1.ClusterContentLibraryItem
- func DummyContentLibraryItem(name, namespace string) *imgregv1a1.ContentLibraryItem
- func GetExpectedCVMIFrom(cclItem imgregv1a1.ClusterContentLibraryItem, ...) *vmopv1.ClusterVirtualMachineImage
- func GetExpectedVMIFrom(clItem imgregv1a1.ContentLibraryItem, ...) *vmopv1.VirtualMachineImage
- func GetImageFieldNameFromItem(itemName string) (string, error)
- func GetServiceTypeLabels(labels map[string]string) map[string]string
- func GetTestVMINameFrom(clItemName string) string
- func GetVMImageSpecStatus(ctx context.Context, ctrlClient client.Client, imageName, namespace string) (*vmopv1.VirtualMachineImageSpec, *vmopv1.VirtualMachineImageStatus, error)
- func IsItemReady(itemConditions imgregv1a1.Conditions) bool
- func PopulateRuntimeFieldsTo(vmi, appliedVMI crtlclient.Object)
Constants ¶
View Source
const ( ItemFieldNamePrefix = "clitem" ImageFieldNamePrefix = "vmi" ClusterContentLibraryKind = "ClusterContentLibrary" ClusterContentLibraryItemKind = "ClusterContentLibraryItem" ContentLibraryKind = "ContentLibrary" ContentLibraryItemKind = "ContentLibraryItem" ContentLibraryItemVmopFinalizer = "contentlibraryitem.vmoperator.vmware.com" ClusterContentLibraryItemVmopFinalizer = "clustercontentlibraryitem.vmoperator.vmware.com" )
View Source
const ContentLibraryServiceTypeLabelKey = "type.services.vmware.com/tkg"
ContentLibraryServiceTypeLabelKey is used to differentiate a TKG resource from a VM service resource.
Variables ¶
This section is empty.
Functions ¶
func DummyClusterContentLibraryItem ¶
func DummyClusterContentLibraryItem(name string) *imgregv1a1.ClusterContentLibraryItem
func DummyContentLibraryItem ¶
func DummyContentLibraryItem(name, namespace string) *imgregv1a1.ContentLibraryItem
func GetExpectedCVMIFrom ¶
func GetExpectedCVMIFrom(cclItem imgregv1a1.ClusterContentLibraryItem, providerFunc func(context.Context, crtlclient.Object, crtlclient.Object) error) *vmopv1.ClusterVirtualMachineImage
func GetExpectedVMIFrom ¶
func GetExpectedVMIFrom(clItem imgregv1a1.ContentLibraryItem, providerFunc func(context.Context, crtlclient.Object, crtlclient.Object) error) *vmopv1.VirtualMachineImage
func GetImageFieldNameFromItem ¶
GetImageFieldNameFromItem returns the image field name in the format of "vmi-<uuid>" by using the identifier from the given item name "clitem-<uuid>".
func GetTestVMINameFrom ¶
func GetVMImageSpecStatus ¶
func GetVMImageSpecStatus( ctx context.Context, ctrlClient client.Client, imageName, namespace string) ( *vmopv1.VirtualMachineImageSpec, *vmopv1.VirtualMachineImageStatus, error)
GetVMImageSpecStatus retrieves the VirtualMachineImageSpec and VirtualMachineImageStatus for a given image name and namespace. It first checks if a namespace scope image exists by the resource name, and if not, checks if a cluster scope image exists by the resource name.
func IsItemReady ¶
func IsItemReady(itemConditions imgregv1a1.Conditions) bool
IsItemReady checks if an item is ready by iterating through its conditions.
func PopulateRuntimeFieldsTo ¶
func PopulateRuntimeFieldsTo(vmi, appliedVMI crtlclient.Object)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.