Documentation ¶
Index ¶
- Constants
- func AddDataVolume(vm *v1.VirtualMachine, diskName string, dataVolume *v1beta1.DataVolume)
- func AddDataVolumeTemplate(vm *v1.VirtualMachine, dataVolume *v1beta1.DataVolume)
- func ArchiveToFile(tgtFile *os.File, sourceFilesNames ...string)
- func ChangeImgFilePermissionsToNonQEMU(pvc *k8sv1.PersistentVolumeClaim)
- func CheckNoProvisionerStorageClassPVs(storageClassName string, numExpectedPVs int)
- func CreateAllSeparateDeviceHostPathPvs(osName, namespace string)
- func CreateBlockPVC(name, namespace, size string) *k8sv1.PersistentVolumeClaim
- func CreateFSPVC(name, namespace, size string, labels map[string]string) *k8sv1.PersistentVolumeClaim
- func CreateHostPathPVC(os, namespace, size string)
- func CreateHostPathPv(osName, namespace, hostPath string) string
- func CreateHostPathPvWithSizeAndStorageClass(osName, namespace, hostPath, size, sc string) string
- func CreateNFSPvAndPvc(name string, namespace string, size string, nfsTargetIP string, os string)
- func CreatePVC(os, namespace, size, storageClass string, recycledPV bool) *k8sv1.PersistentVolumeClaim
- func CreateStorageClass(name string, bindingMode *storagev1.VolumeBindingMode)
- func DeleteAllSeparateDeviceHostPathPvs()
- func DeleteDataVolume(dv **v1beta1.DataVolume)
- func DeletePV(os string)
- func DeletePVC(os, namespace string)
- func DeleteStorageClass(name string)
- func EventuallyDV(dv *v1beta1.DataVolume, timeoutSec int, matcher gomegatypes.GomegaMatcher)
- func EventuallyDVWith(namespace, name string, timeoutSec int, matcher gomegatypes.GomegaMatcher)
- func GetAvailableRWFileSystemStorageClass() (string, bool)
- func GetBlockStorageClass(accessMode k8sv1.PersistentVolumeAccessMode) (string, bool)
- func GetCDI(virtCli kubecli.KubevirtClient) *v1beta1.CDI
- func GetNoVolumeSnapshotStorageClass(preference string) string
- func GetRWOBlockStorageClass() (string, bool)
- func GetRWOFileSystemStorageClass() (string, bool)
- func GetRWXBlockStorageClass() (string, bool)
- func GetRWXFileSystemStorageClass() (string, bool)
- func GetSnapshotClass(scName string, client kubecli.KubevirtClient) (string, error)
- func GetSnapshotStorageClass(client kubecli.KubevirtClient) (string, error)
- func GetWFFCStorageSnapshotClass(client kubecli.KubevirtClient) (string, error)
- func GoldenImageRBAC(namespace string) (*rbacv1.Role, *rbacv1.RoleBinding)
- func HasCDI() bool
- func HasDataVolumeCRD() bool
- func IsDataVolumeGC(virtCli kubecli.KubevirtClient) bool
- func IsStorageClassBindingModeWaitForFirstConsumer(sc string) bool
- func LookupVolumeTargetPath(vmi *v1.VirtualMachineInstance, volumeName string) string
- func NewPVC(name, size, storageClass string) *k8sv1.PersistentVolumeClaim
- func NewSnapshot(vm, namespace string) *snapshotv1.VirtualMachineSnapshot
- func NewVolumeSnapshot(name, namespace, sourcePvcName string, snapshotClassName *string) *vsv1.VolumeSnapshot
- func RenderPodWithPVC(name string, cmd []string, args []string, pvc *k8sv1.PersistentVolumeClaim) *k8sv1.Pod
- func RenderVMIWithDataVolume(dvName, ns string, opts ...libvmi.Option) *v1.VirtualMachineInstance
- func RenderVMWithDataVolumeTemplate(dv *v1beta1.DataVolume, opts ...libvmi.VMOption) *v1.VirtualMachine
- func SetDataVolumeGC(virtCli kubecli.KubevirtClient, ttlSec *int32)
- func WaitSnapshotSucceeded(virtClient kubecli.KubevirtClient, namespace string, snapshotName string) *snapshotv1.VirtualMachineSnapshot
- type KubeVirtTestsConfiguration
Constants ¶
const ( DefaultPvcMountPath = "/pvc" StorageClassHostPathSeparateDevice = "host-path-sd" )
Variables ¶
This section is empty.
Functions ¶
func AddDataVolume ¶ added in v0.57.0
func AddDataVolume(vm *v1.VirtualMachine, diskName string, dataVolume *v1beta1.DataVolume)
func AddDataVolumeTemplate ¶
func AddDataVolumeTemplate(vm *v1.VirtualMachine, dataVolume *v1beta1.DataVolume)
func ArchiveToFile ¶ added in v1.4.0
func ChangeImgFilePermissionsToNonQEMU ¶ added in v1.4.0
func ChangeImgFilePermissionsToNonQEMU(pvc *k8sv1.PersistentVolumeClaim)
func CheckNoProvisionerStorageClassPVs ¶ added in v0.55.0
func CreateAllSeparateDeviceHostPathPvs ¶ added in v0.55.0
func CreateAllSeparateDeviceHostPathPvs(osName, namespace string)
func CreateBlockPVC ¶ added in v0.55.0
func CreateBlockPVC(name, namespace, size string) *k8sv1.PersistentVolumeClaim
func CreateFSPVC ¶ added in v0.55.0
func CreateFSPVC(name, namespace, size string, labels map[string]string) *k8sv1.PersistentVolumeClaim
func CreateHostPathPVC ¶ added in v0.55.0
func CreateHostPathPVC(os, namespace, size string)
func CreateHostPathPv ¶ added in v0.55.0
func CreateHostPathPvWithSizeAndStorageClass ¶ added in v0.55.0
func CreateNFSPvAndPvc ¶ added in v0.55.0
func CreatePVC ¶ added in v0.55.0
func CreatePVC(os, namespace, size, storageClass string, recycledPV bool) *k8sv1.PersistentVolumeClaim
func CreateStorageClass ¶
func CreateStorageClass(name string, bindingMode *storagev1.VolumeBindingMode)
func DeleteAllSeparateDeviceHostPathPvs ¶ added in v0.55.0
func DeleteAllSeparateDeviceHostPathPvs()
func DeleteDataVolume ¶ added in v0.57.0
func DeleteDataVolume(dv **v1beta1.DataVolume)
func DeleteStorageClass ¶
func DeleteStorageClass(name string)
func EventuallyDV ¶ added in v0.57.0
func EventuallyDV(dv *v1beta1.DataVolume, timeoutSec int, matcher gomegatypes.GomegaMatcher)
func EventuallyDVWith ¶ added in v0.57.0
func EventuallyDVWith(namespace, name string, timeoutSec int, matcher gomegatypes.GomegaMatcher)
func GetAvailableRWFileSystemStorageClass ¶ added in v1.2.1
GetAvailableRWFileSystemStorageClass returns any RWX or RWO access mode filesystem storage class available, i.e, If the available filesystem storage classes only support RWO access mode, it returns that SC or vice versa. This method to get a filesystem storage class is recommended when the access mode is not relevant for the purpose of the test.
func GetBlockStorageClass ¶ added in v0.58.0
func GetBlockStorageClass(accessMode k8sv1.PersistentVolumeAccessMode) (string, bool)
func GetNoVolumeSnapshotStorageClass ¶ added in v0.59.0
GetNoVolumeSnapshotStorageClass goes over all the existing storage classes and returns one which doesnt have volume snapshot ability if the preference storage class exists and is without snapshot ability it will be returned
func GetRWOBlockStorageClass ¶
func GetRWXBlockStorageClass ¶
func GetSnapshotClass ¶ added in v1.0.1
func GetSnapshotClass(scName string, client kubecli.KubevirtClient) (string, error)
func GetSnapshotStorageClass ¶
func GetSnapshotStorageClass(client kubecli.KubevirtClient) (string, error)
func GetWFFCStorageSnapshotClass ¶ added in v1.2.0
func GetWFFCStorageSnapshotClass(client kubecli.KubevirtClient) (string, error)
func GoldenImageRBAC ¶ added in v0.56.0
func GoldenImageRBAC(namespace string) (*rbacv1.Role, *rbacv1.RoleBinding)
func HasDataVolumeCRD ¶
func HasDataVolumeCRD() bool
func IsDataVolumeGC ¶ added in v0.57.0
func IsDataVolumeGC(virtCli kubecli.KubevirtClient) bool
func IsStorageClassBindingModeWaitForFirstConsumer ¶ added in v0.55.0
func LookupVolumeTargetPath ¶ added in v1.4.0
func LookupVolumeTargetPath(vmi *v1.VirtualMachineInstance, volumeName string) string
func NewPVC ¶ added in v0.55.0
func NewPVC(name, size, storageClass string) *k8sv1.PersistentVolumeClaim
func NewSnapshot ¶ added in v1.4.0
func NewSnapshot(vm, namespace string) *snapshotv1.VirtualMachineSnapshot
func NewVolumeSnapshot ¶ added in v1.0.1
func NewVolumeSnapshot(name, namespace, sourcePvcName string, snapshotClassName *string) *vsv1.VolumeSnapshot
NewVolumeSnapshot initializes a VolumeSnapshot struct
func RenderPodWithPVC ¶ added in v0.55.0
func RenderVMIWithDataVolume ¶ added in v1.4.0
func RenderVMIWithDataVolume(dvName, ns string, opts ...libvmi.Option) *v1.VirtualMachineInstance
func RenderVMWithDataVolumeTemplate ¶ added in v1.4.0
func RenderVMWithDataVolumeTemplate(dv *v1beta1.DataVolume, opts ...libvmi.VMOption) *v1.VirtualMachine
func SetDataVolumeGC ¶ added in v0.57.0
func SetDataVolumeGC(virtCli kubecli.KubevirtClient, ttlSec *int32)
func WaitSnapshotSucceeded ¶ added in v1.4.0
func WaitSnapshotSucceeded(virtClient kubecli.KubevirtClient, namespace string, snapshotName string) *snapshotv1.VirtualMachineSnapshot
Types ¶
type KubeVirtTestsConfiguration ¶
type KubeVirtTestsConfiguration struct { // StorageClass to use to create rhel PVCs StorageClassRhel string `json:"storageClassRhel"` // StorageClass to use to create windows PVCs StorageClassWindows string `json:"storageClassWindows"` // StorageClass supporting RWX Filesystem StorageRWXFileSystem string `json:"storageRWXFileSystem"` // StorageClass supporting RWX Block StorageRWXBlock string `json:"storageRWXBlock"` // StorageClass supporting RWO Filesystem StorageRWOFileSystem string `json:"storageRWOFileSystem"` // StorageClass supporting RWO Block StorageRWOBlock string `json:"storageRWOBlock"` // StorageClass supporting snapshot StorageSnapshot string `json:"storageSnapshot"` }
KubeVirtTestsConfiguration contains the configuration for KubeVirt tests
var Config *KubeVirtTestsConfiguration
func LoadConfig ¶
func LoadConfig() (*KubeVirtTestsConfiguration, error)