Documentation ¶
Overview ¶
* This file is part of the KubeVirt project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Copyright 2021 Red Hat, Inc. *
Index ¶
- Constants
- Variables
- func AddBootOrderToDisk(vmi *v1.VirtualMachineInstance, diskName string, bootorder *uint) *v1.VirtualMachineInstance
- func AddCloudInitConfigDriveData(vmi *v1.VirtualMachineInstance, name, userData, networkData string, ...)
- func AddCloudInitNoCloudData(vmi *v1.VirtualMachineInstance, name, userData, networkData string, ...)
- func AddConfigMapDisk(vmi *v1.VirtualMachineInstance, configMapName string, volumeName string)
- func AddConfigMapDiskWithCustomLabel(vmi *v1.VirtualMachineInstance, configMapName string, volumeName string, ...)
- func AddDataVolumeDisk(vmi *v1.VirtualMachineInstance, diskName, dataVolumeName string) *v1.VirtualMachineInstance
- func AddDownwardMetricsVolume(vmi *v1.VirtualMachineInstance, volumeName string)
- func AddEphemeralCdrom(vmi *v1.VirtualMachineInstance, name string, bus string, image string) *v1.VirtualMachineInstance
- func AddEphemeralDisk(vmi *v1.VirtualMachineInstance, name string, bus string, image string) *v1.VirtualMachineInstance
- func AddExplicitPodNetworkInterface(vmi *v1.VirtualMachineInstance)
- func AddHostDisk(vmi *v1.VirtualMachineInstance, path string, diskType v1.HostDiskType, ...)
- func AddLabelDownwardAPIVolume(vmi *v1.VirtualMachineInstance, volumeName string)
- func AddLabelToNode(nodeName string, key string, value string)
- func AddPVCDisk(vmi *v1.VirtualMachineInstance, name string, bus string, claimName string) *v1.VirtualMachineInstance
- func AddPVCFS(vmi *v1.VirtualMachineInstance, name string, claimName string) *v1.VirtualMachineInstance
- func AddSecretDisk(vmi *v1.VirtualMachineInstance, secretName string, volumeName string)
- func AddSecretDiskWithCustomLabel(vmi *v1.VirtualMachineInstance, secretName string, volumeName string, ...)
- func AddServiceAccountDisk(vmi *v1.VirtualMachineInstance, serviceAccountName string)
- func AddUserData(vmi *v1.VirtualMachineInstance, name string, userData string)
- func AddVolumeAndVerify(virtClient kubecli.KubevirtClient, storageClass string, vm *v1.VirtualMachine, ...) string
- func AdjustKubeVirtResource()
- func AfterTestSuitCleanup()
- func AppendEmptyDisk(vmi *v1.VirtualMachineInstance, diskName, busName, diskSize string)
- func ApplyRawManifest(object unstructured.Unstructured) error
- func ArchiveToFile(tgtFile *os.File, sourceFilesNames ...string)
- func BeforeTestCleanup()
- func BeforeTestSuitSetup(_ []byte)
- func CalculateNamespaces()
- func CallUrlOnPod(pod *k8sv1.Pod, port string, url string) ([]byte, error)
- func CheckCloudInitMetaData(vmi *v1.VirtualMachineInstance, testFile, testData string)
- func CleanNodes()
- func ClearDedicatedMigrationNetwork() *v1.KubeVirt
- func ConfirmVMIPostMigration(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance, ...) *v1.VirtualMachineInstance
- func ContainsCrt(bundle []byte, containedCrt []byte) bool
- func CopyAlpineWithNonQEMUPermissions() (dstPath, nodeName string)
- func CopyFromPod(virtCli kubecli.KubevirtClient, pod *k8sv1.Pod, ...) (stderr string, err error)
- func CreateAllSeparateDeviceHostPathPvs(osName string)
- func CreateArchive(targetFile, tgtDir string, sourceFilesNames ...string) string
- func CreateBlockPVC(virtClient kubecli.KubevirtClient, name string, size resource.Quantity) *k8sv1.PersistentVolumeClaim
- func CreateCommandWithNS(namespace string, cmdName string, args ...string) (string, *exec.Cmd, error)
- func CreateConfigMap(name string, data map[string]string)
- func CreateErrorDisk(nodeName string) (address string, device string)
- func CreateFaultyDisk(nodeName, deviceName string)
- func CreateHostDiskImage(diskPath string) *k8sv1.Pod
- func CreateHostPathPVC(os, size string)
- func CreateHostPathPv(osName, hostPath string) string
- func CreateHostPathPvWithSizeAndStorageClass(osName, hostPath, size, sc string) string
- func CreateNFSPvAndPvc(name string, namespace string, size string, nfsTargetIP string, os string)
- func CreatePVC(os, size, storageClass string, recycledPV bool) *k8sv1.PersistentVolumeClaim
- func CreatePVandPVCwithFaultyDisk(nodeName, devicePath, namespace string) (*corev1.PersistentVolume, *corev1.PersistentVolumeClaim, error)
- func CreatePVandPVCwithSCSIDisk(nodeName, devicePath, namespace, storageClass, pvName, pvcName string) (*corev1.PersistentVolume, *corev1.PersistentVolumeClaim, error)
- func CreatePodAndWaitUntil(pod *corev1.Pod, phaseToWait corev1.PodPhase) *corev1.Pod
- func CreateRuntimeClass(name, handler string) (*nodev1.RuntimeClass, error)
- func CreateSCSIDisk(nodeName string, opts []string) (address string, device string)
- func CreateSecret(name string, data map[string]string)
- func CreateStorageClass(name string, bindingMode *storagev1.VolumeBindingMode)
- func CreateVmiOnNode(vmi *v1.VirtualMachineInstance, nodeName string) *v1.VirtualMachineInstance
- func CreateVmiOnNodeLabeled(vmi *v1.VirtualMachineInstance, nodeLabel, labelValue string) *v1.VirtualMachineInstance
- func DeleteAllSeparateDeviceHostPathPvs()
- func DeleteAlpineWithNonQEMUPermissions()
- func DeleteConfigMap(name string)
- func DeletePV(os string)
- func DeletePVC(os string)
- func DeletePvAndPvc(name string)
- func DeleteRawManifest(object unstructured.Unstructured) error
- func DeleteRuntimeClass(name string) error
- func DeleteSecret(name string)
- func DeleteStorageClass(name string)
- func DeployTestingInfrastructure()
- func DeprecatedBeforeAll(fn func())deprecated
- func DetectLatestUpstreamOfficialTag() (string, error)
- func DisableFeatureGate(feature string)
- func DryRunCreate(client *rest.RESTClient, resource, namespace string, obj interface{}, ...) error
- func DryRunPatch(client *rest.RESTClient, resource, name, namespace string, pt types.PatchType, ...) error
- func DryRunUpdate(client *rest.RESTClient, resource, name, namespace string, obj interface{}, ...) error
- func EnableFeatureGate(feature string) *v1.KubeVirt
- func EncodePrivateKeyToPEM(privateKey *rsa.PrivateKey) []byte
- func EnsureKVMPresent()
- func EnsureNoMigrationMetadataInPersistentXML(vmi *v1.VirtualMachineInstance)
- func EnsurePodsCertIsSynced(labelSelector string, namespace string, port string) []byte
- func ExecuteCommandInVirtHandlerPod(nodeName string, args []string) (stdout string, err error)
- func ExecuteCommandOnPod(virtCli kubecli.KubevirtClient, pod *k8sv1.Pod, containerName string, ...) (string, error)
- func ExecuteCommandOnPodV2(virtCli kubecli.KubevirtClient, pod *k8sv1.Pod, containerName string, ...) (stdout, stderr string, err error)
- func ExpectMigrationSuccess(virtClient kubecli.KubevirtClient, ...) string
- func ExpectResourceVersionToBeLessEqualThanConfigVersion(resourceVersion, configVersion string) bool
- func FixErrorDevice(nodeName string)
- func FormatIPForURL(ip string) string
- func ForwardPorts(pod *k8sv1.Pod, ports []string, stop chan struct{}, readyTimeout time.Duration) error
- func GenerateHelloWorldServer(vmi *v1.VirtualMachineInstance, testPort int, protocol string)
- func GenerateMigrationCNINetworkAttachmentDefinition() *k8snetworkplumbingwgv1.NetworkAttachmentDefinition
- func GeneratePrivateKey(bitSize int) (*rsa.PrivateKey, error)
- func GeneratePublicKey(privatekey *rsa.PublicKey) ([]byte, error)
- func GenerateRandomMac() (net.HardwareAddr, error)
- func GenerateTemplateJson(template *vmsgen.Template, generateDirectory string) (string, error)
- func GenerateVMIJson(vmi *v1.VirtualMachineInstance, generateDirectory string) (string, error)
- func GenerateVMJson(vm *v1.VirtualMachine, generateDirectory string) (string, error)
- func GetBundleFromConfigMap(configMapName string) ([]byte, []*x509.Certificate)
- func GetCertFromSecret(secretName string) []byte
- func GetCertsForPods(labelSelector string, namespace string, port string) ([][]byte, error)
- func GetComputeContainerOfPod(pod *k8sv1.Pod) *k8sv1.Container
- func GetContainerDiskContainerOfPod(pod *k8sv1.Pod, volumeName string) *k8sv1.Container
- func GetContainerOfPod(pod *k8sv1.Pod, containerName string) *k8sv1.Container
- func GetFedoraToolsGuestAgentBlacklistUserData(commands string) string
- func GetHighestCPUNumberAmongNodes(virtClient kubecli.KubevirtClient) int
- func GetIdOfLauncher(vmi *v1.VirtualMachineInstance) string
- func GetK8sCmdClient() string
- func GetKubernetesApiServiceIp(virtClient kubecli.KubevirtClient) (string, error)
- func GetListOfManifests(pathToManifestsDir string) []string
- func GetNodeDrainKey() string
- func GetNodeWithHugepages(virtClient kubecli.KubevirtClient, hugepages k8sv1.ResourceName) *k8sv1.Node
- func GetNodesWithKVM() []*k8sv1.Node
- func GetPodByVirtualMachineInstance(vmi *v1.VirtualMachineInstance) *k8sv1.Pod
- func GetPodCPUSet(pod *k8sv1.Pod) (output string, err error)
- func GetPodsCertIfSynced(labelSelector string, namespace string, port string) (cert []byte, synced bool, err error)
- func GetPodsCgroupVersion(pod *k8sv1.Pod, virtClient kubecli.KubevirtClient) cgroup.CgroupVersion
- func GetPolicyMatchedToVmi(name string, vmi *v1.VirtualMachineInstance, namespace *k8sv1.Namespace, ...) *migrationsv1.MigrationPolicy
- func GetRWOBlockStorageClass() (string, bool)
- func GetRWOFileSystemStorageClass() (string, bool)
- func GetRWXBlockStorageClass() (string, bool)
- func GetRWXFileSystemStorageClass() (string, bool)
- func GetRunningPodByLabel(label string, labelType string, namespace string, node string) (*k8sv1.Pod, error)
- func GetRunningPodByVirtualMachineInstance(vmi *v1.VirtualMachineInstance, namespace string) *k8sv1.Pod
- func GetRunningVMIDomainSpec(vmi *v1.VirtualMachineInstance) (*launcherApi.DomainSpec, error)
- func GetRunningVirtualMachineInstanceDomainXML(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance) (string, error)
- func GetSnapshotStorageClass() (string, bool)
- func GetSupportedCPUFeatures(nodes k8sv1.NodeList) []string
- func GetSupportedCPUModels(nodes k8sv1.NodeList) []string
- func GetUpstreamReleaseAssetURL(tag string, assetName string) string
- func GetVMIsCgroupVersion(vmi *v1.VirtualMachineInstance, virtClient kubecli.KubevirtClient) cgroup.CgroupVersion
- func GetVmPodName(virtCli kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance) string
- func HasCDI() bool
- func HasDataVolumeCRD() bool
- func HasExperimentalIgnitionSupport() bool
- func IsLauncherCapabilityDropped(capability k8sv1.Capability) bool
- func IsLauncherCapabilityValid(capability k8sv1.Capability) bool
- func IsRunningOnKindInfra() bool
- func IsStorageClassBindingModeWaitForFirstConsumer(sc string) bool
- func IsUsingBuiltinNodeDrainKey() bool
- func LibvirtDomainIsPaused(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance) (bool, error)
- func LibvirtDomainIsPersistent(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance) (bool, error)
- func LoginToVM(vmi *v1.VirtualMachineInstance, loginTo console.LoginToFunction) *v1.VirtualMachineInstance
- func MountCloudInitFunc(devName string) func(*v1.VirtualMachineInstance)
- func NewBool(x bool) *bool
- func NewHTTPServerPod(port int) *corev1.Pod
- func NewHelloWorldJobHTTP(host string, port string) *batchv1.Job
- func NewHelloWorldJobTCP(host string, port string) *batchv1.Job
- func NewHelloWorldJobUDP(host, port string) *batchv1.Job
- func NewInt32(x int32) *int32
- func NewJob(name string, cmd, args []string, retry, ttlAfterFinished int32, timeout int64) *batchv1.Job
- func NewRandomBlankDataVolume(namespace, storageClass, size string, ...) *cdiv1.DataVolume
- func NewRandomBlockDataVolumeWithRegistryImport(imageUrl, namespace string, accessMode k8sv1.PersistentVolumeAccessMode) *cdiv1.DataVolume
- func NewRandomDataVolumeWithPVCSource(sourceNamespace, sourceName, targetNamespace string, ...) *cdiv1.DataVolume
- func NewRandomDataVolumeWithRegistryImport(imageUrl, namespace string, accessMode k8sv1.PersistentVolumeAccessMode) *cdiv1.DataVolume
- func NewRandomDataVolumeWithRegistryImportInStorageClass(imageUrl, namespace, storageClass string, ...) *cdiv1.DataVolume
- func NewRandomFedoraVMI() *v1.VirtualMachineInstance
- func NewRandomFedoraVMIWithBlacklistGuestAgent(commands string) *v1.VirtualMachineInstance
- func NewRandomFedoraVMIWithDmidecode() *v1.VirtualMachineInstance
- func NewRandomFedoraVMIWithGuestAgent() *v1.VirtualMachineInstance
- func NewRandomFedoraVMIWithVirtWhatCpuidHelper() *v1.VirtualMachineInstance
- func NewRandomMigration(vmiName string, namespace string) *v1.VirtualMachineInstanceMigration
- func NewRandomReplicaSetFromVMI(vmi *v1.VirtualMachineInstance, replicas int32) *v1.VirtualMachineInstanceReplicaSet
- func NewRandomVMI() *v1.VirtualMachineInstance
- func NewRandomVMIWithCDRom(claimName string) *v1.VirtualMachineInstance
- func NewRandomVMIWithConfigMap(configMapName string) *v1.VirtualMachineInstance
- func NewRandomVMIWithDataVolume(dataVolumeName string) *v1.VirtualMachineInstance
- func NewRandomVMIWithEFIBootloader() *v1.VirtualMachineInstance
- func NewRandomVMIWithEphemeralDisk(containerImage string) *v1.VirtualMachineInstance
- func NewRandomVMIWithEphemeralDiskAndConfigDriveUserdata(containerImage string, userData string) *v1.VirtualMachineInstance
- func NewRandomVMIWithEphemeralDiskAndConfigDriveUserdataHighMemory(containerImage string, userData string) *v1.VirtualMachineInstance
- func NewRandomVMIWithEphemeralDiskAndConfigDriveUserdataNetworkData(containerImage, userData, networkData string, b64encode bool) *v1.VirtualMachineInstance
- func NewRandomVMIWithEphemeralDiskAndUserdata(containerImage string, userData string) *v1.VirtualMachineInstance
- func NewRandomVMIWithEphemeralDiskAndUserdataHighMemory(containerImage string, userData string) *v1.VirtualMachineInstance
- func NewRandomVMIWithEphemeralDiskAndUserdataNetworkData(containerImage, userData, networkData string, b64encode bool) *v1.VirtualMachineInstance
- func NewRandomVMIWithEphemeralDiskHighMemory(containerImage string) *v1.VirtualMachineInstance
- func NewRandomVMIWithEphemeralPVC(claimName string) *v1.VirtualMachineInstance
- func NewRandomVMIWithFSFromDataVolume(dataVolumeName string) *v1.VirtualMachineInstance
- func NewRandomVMIWithHostDisk(diskPath string, diskType v1.HostDiskType, nodeName string) *v1.VirtualMachineInstance
- func NewRandomVMIWithNS(namespace string) *v1.VirtualMachineInstance
- func NewRandomVMIWithPVC(claimName string) *v1.VirtualMachineInstance
- func NewRandomVMIWithPVCAndUserData(claimName, userData string) *v1.VirtualMachineInstance
- func NewRandomVMIWithPVCFS(claimName string) *v1.VirtualMachineInstance
- func NewRandomVMIWithSecret(secretName string) *v1.VirtualMachineInstance
- func NewRandomVMIWithSecureBoot() *v1.VirtualMachineInstance
- func NewRandomVMIWithServiceAccount(serviceAccountName string) *v1.VirtualMachineInstance
- func NewRandomVMIWithWatchdog() *v1.VirtualMachineInstance
- func NewRandomVMWithCloneDataVolume(sourceNamespace, sourceName, targetNamespace string) *v1.VirtualMachine
- func NewRandomVMWithDataVolume(imageUrl string, namespace string) *v1.VirtualMachine
- func NewRandomVMWithDataVolumeAndUserData(dataVolume *cdiv1.DataVolume, userData string) *v1.VirtualMachine
- func NewRandomVMWithDataVolumeAndUserDataInStorageClass(imageUrl, namespace, userData, storageClass string) *v1.VirtualMachine
- func NewRandomVMWithDataVolumeWithRegistryImport(imageUrl, namespace, storageClass string, ...) *v1.VirtualMachine
- func NewRandomVMWithEphemeralDisk(containerImage string) *v1.VirtualMachine
- func NewRandomVirtualMachine(vmi *v1.VirtualMachineInstance, running bool) *v1.VirtualMachine
- func NewRandomVirtualMachineInstanceWithBlockDisk(imageUrl, namespace string, accessMode k8sv1.PersistentVolumeAccessMode) (*v1.VirtualMachineInstance, *cdiv1.DataVolume)
- func NewRandomVirtualMachineInstanceWithDisk(imageUrl, namespace, sc string, accessMode k8sv1.PersistentVolumeAccessMode, ...) (*v1.VirtualMachineInstance, *cdiv1.DataVolume)
- func NewRandomVirtualMachineInstanceWithFileDisk(imageUrl, namespace string, accessMode k8sv1.PersistentVolumeAccessMode) (*v1.VirtualMachineInstance, *cdiv1.DataVolume)
- func NewRepeatableVirtctlCommand(args ...string) func() error
- func NewTCPServerPod(port int) *corev1.Pod
- func NewVirtctlCommand(args ...string) *cobra.Command
- func NodeNameWithHandler() string
- func NotDeleted(vmis *v1.VirtualMachineInstanceList) (notDeleted []v1.VirtualMachineInstance)
- func NotDeletedVMs(vms *v1.VirtualMachineList) (notDeleted []v1.VirtualMachine)
- func PodReady(pod *k8sv1.Pod) k8sv1.ConditionStatus
- func PrometheusRuleEnabled() bool
- func RandTmpDir() string
- func ReadManifestYamlFile(pathToManifest string) []unstructured.Unstructured
- func RemoveFaultyDisk(nodeName, deviceName string)
- func RemoveHostDiskImage(diskPath string, nodeName string)
- func RemoveLabelFromNode(nodeName string, key string)
- func RemoveSCSIDisk(nodeName, address string)
- func RenderHostPathPod(podName string, dir string, hostPathType k8sv1.HostPathType, ...) *k8sv1.Pod
- func RenderPod(name string, cmd []string, args []string) *k8sv1.Pod
- func RenderPrivilegedPod(name string, cmd []string, args []string) *k8sv1.Pod
- func RestoreKubeVirtResource()
- func RetryIfModified(do func() error) (err error)
- func RetryWithMetadataIfModified(objectMeta metav1.ObjectMeta, do func(objectMeta metav1.ObjectMeta) error) (err error)
- func RunCommand(cmdName string, args ...string) (string, string, error)
- func RunCommandOnVmiPod(vmi *v1.VirtualMachineInstance, command []string) string
- func RunCommandOnVmiTargetPod(vmi *v1.VirtualMachineInstance, command []string) (string, error)
- func RunCommandPipe(commands ...[]string) (string, string, error)
- func RunCommandPipeWithNS(namespace string, commands ...[]string) (string, string, error)
- func RunCommandWithNS(namespace string, cmdName string, args ...string) (string, string, error)
- func RunCommandWithNSAndInput(namespace string, input io.Reader, cmdName string, args ...string) (string, string, error)
- func RunMigration(virtClient kubecli.KubevirtClient, ...) *v1.VirtualMachineInstanceMigration
- func RunMigrationAndExpectCompletion(virtClient kubecli.KubevirtClient, ...) string
- func RunPod(pod *k8sv1.Pod) *k8sv1.Pod
- func RunPodAndExpectCompletion(pod *k8sv1.Pod) *k8sv1.Pod
- func RunVMI(vmi *v1.VirtualMachineInstance, timeout int) *v1.VirtualMachineInstance
- func RunVMIAndExpectLaunch(vmi *v1.VirtualMachineInstance, timeout int) *v1.VirtualMachineInstance
- func RunVMIAndExpectLaunchIgnoreWarnings(vmi *v1.VirtualMachineInstance, timeout int) *v1.VirtualMachineInstance
- func RunVMIAndExpectLaunchWithDataVolume(vmi *v1.VirtualMachineInstance, dv *cdiv1.DataVolume, timeout int) *v1.VirtualMachineInstance
- func RunVMIAndExpectScheduling(vmi *v1.VirtualMachineInstance, timeout int) *v1.VirtualMachineInstance
- func Running(vmis *v1.VirtualMachineInstanceList) (running []v1.VirtualMachineInstance)
- func ServiceMonitorEnabled() bool
- func SetDataVolumeForceBindAnnotation(dv *cdiv1.DataVolume)
- func SetDedicatedMigrationNetwork(nad string) *v1.KubeVirt
- func ShouldAllowEmulation(virtClient kubecli.KubevirtClient) bool
- func SkipIfNoCmd(cmdName string)
- func StartHTTPServer(vmi *v1.VirtualMachineInstance, port int)
- func StartHTTPServerPod(port int) *corev1.Pod
- func StartHTTPServerWithSourceIp(vmi *v1.VirtualMachineInstance, port int, sourceIP string)
- func StartPythonHttpServer(vmi *v1.VirtualMachineInstance, port int)
- func StartTCPServer(vmi *v1.VirtualMachineInstance, port int)
- func StartTCPServerPod(port int) *corev1.Pod
- func StartVirtualMachine(vm *v1.VirtualMachine) *v1.VirtualMachine
- func StopVirtualMachine(vm *v1.VirtualMachine) *v1.VirtualMachine
- func StopVirtualMachineWithTimeout(vm *v1.VirtualMachine, timeout time.Duration) *v1.VirtualMachine
- func SynchronizedAfterTestSuiteCleanup()
- func SynchronizedBeforeTestSetup() []byte
- func Taint(nodeName string, key string, effect k8sv1.TaintEffect)
- func UnfinishedVMIPodSelector(vmi *v1.VirtualMachineInstance) metav1.ListOptions
- func UpdateKubeVirtConfigValue(kvConfig v1.KubeVirtConfiguration) *v1.KubeVirt
- func UpdateKubeVirtConfigValueAndWait(kvConfig v1.KubeVirtConfiguration) *v1.KubeVirt
- func VMILauncherIgnoreWarnings(virtClient kubecli.KubevirtClient) func(vmi *v1.VirtualMachineInstance) *v1.VirtualMachineInstance
- func VerifyVolumeAndDiskVMAdded(virtClient kubecli.KubevirtClient, vm *v1.VirtualMachine, ...)
- func VerifyVolumeAndDiskVMIAdded(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance, ...)
- func VolumeExpansionAllowed(sc string) bool
- func WaitAgentConnected(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance)
- func WaitAgentDisconnected(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance)
- func WaitForAllPodsReady(timeout time.Duration, listOptions metav1.ListOptions)
- func WaitForConfigToBePropagatedToComponent(podLabel string, resourceVersion string, compareResourceVersions compare, ...)
- func WaitForJobToFail(job *batchv1.Job, timeout time.Duration) error
- func WaitForJobToSucceed(job *batchv1.Job, timeout time.Duration) error
- func WaitForMigrationToDisappearWithTimeout(migration *v1.VirtualMachineInstanceMigration, seconds int)
- func WaitForPodToDisappearWithTimeout(podName string, seconds int)
- func WaitForSuccessfulVMIStart(vmi runtime.Object) *v1.VirtualMachineInstance
- func WaitForSuccessfulVMIStartIgnoreWarnings(vmi runtime.Object) *v1.VirtualMachineInstance
- func WaitForSuccessfulVMIStartWithContext(ctx context.Context, vmi runtime.Object) *v1.VirtualMachineInstance
- func WaitForSuccessfulVMIStartWithContextIgnoreSelectedWarnings(ctx context.Context, vmi runtime.Object, warningsIgnoreList []string) *v1.VirtualMachineInstance
- func WaitForSuccessfulVMIStartWithTimeout(vmi runtime.Object, seconds int) *v1.VirtualMachineInstance
- func WaitForSuccessfulVMIStartWithTimeoutIgnoreWarnings(vmi runtime.Object, seconds int) *v1.VirtualMachineInstance
- func WaitForVMCondition(virtClient kubecli.KubevirtClient, vm *v1.VirtualMachine, ...)
- func WaitForVMConditionRemovedOrFalse(virtClient kubecli.KubevirtClient, vm *v1.VirtualMachine, ...)
- func WaitForVMICondition(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance, ...)
- func WaitForVMIConditionRemovedOrFalse(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance, ...)
- func WaitForVMIStartOrFailed(obj runtime.Object, seconds int, wp WarningsPolicy) *v1.VirtualMachineInstance
- func WaitForVirtualMachineToDisappearWithTimeout(vmi *v1.VirtualMachineInstance, seconds int)
- func WaitUntilVMIReady(vmi *v1.VirtualMachineInstance, loginTo console.LoginToFunction) *v1.VirtualMachineInstance
- func WaitUntilVMIReadyIgnoreSelectedWarnings(vmi *v1.VirtualMachineInstance, loginTo console.LoginToFunction, ...) *v1.VirtualMachineInstance
- func WaitUntilVMIReadyWithContext(ctx context.Context, vmi *v1.VirtualMachineInstance, ...) *v1.VirtualMachineInstance
- func WaitUntilVMIReadyWithContextIgnoreSelectedWarnings(ctx context.Context, vmi *v1.VirtualMachineInstance, ...) *v1.VirtualMachineInstance
- func WipeTestingInfrastructure()
- type EventType
- type KubeVirtTestsConfiguration
- type ObjectEventWatcher
- func (w *ObjectEventWatcher) SetWarningsPolicy(wp WarningsPolicy) *ObjectEventWatcher
- func (w *ObjectEventWatcher) SinceNow() *ObjectEventWatcher
- func (w *ObjectEventWatcher) SinceObjectResourceVersion(object runtime.Object) *ObjectEventWatcher
- func (w *ObjectEventWatcher) SinceResourceVersion(rv string) *ObjectEventWatcher
- func (w *ObjectEventWatcher) SinceWatchedObjectResourceVersion() *ObjectEventWatcher
- func (w *ObjectEventWatcher) Timeout(duration time.Duration) *ObjectEventWatcher
- func (w *ObjectEventWatcher) WaitFor(ctx context.Context, eventType EventType, reason interface{}) (e *k8sv1.Event)
- func (w *ObjectEventWatcher) WaitNotFor(ctx context.Context, eventType EventType, reason interface{}) (e *k8sv1.Event)
- func (w *ObjectEventWatcher) Watch(ctx context.Context, processFunc ProcessFunc, watchedDescription string)
- type ProcessFunc
- type WarningsPolicy
Constants ¶
const ( UsrBinVirtChroot = "/usr/bin/virt-chroot" Mount = "--mount" Proc1NsMnt = "/proc/1/ns/mnt" )
const ( JobRetry = 3 JobTTL = 60 JobTimeout = 480 )
Default Job arguments to be used with NewJob.
const ( KubevirtIoTest = "kubevirt.io/test" KubernetesIoHostName = "kubernetes.io/hostname" BinBash = "/bin/bash" StartingVMInstance = "Starting a VirtualMachineInstance" WaitingVMInstanceStart = "Waiting until the VirtualMachineInstance will start" KubevirtIoV1Alpha1 = "cdi.kubevirt.io/v1alpha1" ServerName = "--server" CouldNotFindComputeContainer = "could not find compute container for pod" CommandPipeFailed = "command pipe failed" CommandPipeFailedFmt = "command pipe failed: %v" EchoLastReturnValue = "echo $?\n" BashHelloScript = "#!/bin/bash\necho 'hello'\n" )
const ( SubresourceServiceAccountName = "kubevirt-subresource-test-sa" AdminServiceAccountName = "kubevirt-admin-test-sa" EditServiceAccountName = "kubevirt-edit-test-sa" ViewServiceAccountName = "kubevirt-view-test-sa" )
const ( OSWindows = "windows" OSWindowsSysprep = "windows-sysprep" // This is for sysprep tests, they run on a syspreped image of windows of a different version. OSRhel = "rhel" CustomHostPath = "custom-host-path" HostPathBase = "/tmp/hostImages" )
const ( DiskAlpineHostPath = "disk-alpine-host-path" DiskWindows = "disk-windows" DiskWindowsSysprep = "disk-windows-sysprep" DiskCustomHostPath = "disk-custom-host-path" )
const ( TCPServer = server("\"Hello World!\"\n") HTTPServer = server("\"HTTP/1.1 200 OK\\nContent-Length: 12\\n\\nHello World!\"\n") )
const ContainerCompletionWaitTime = 60
const MigrationWaitTime = 240
const (
SecretLabel = "kubevirt.io/secret"
)
const StorageClassHostPathSeparateDevice = "host-path-sd"
const SubresourceTestLabel = "subresource-access-test-pod"
const VMIResource = "virtualmachineinstances"
Variables ¶
var ( HostPathAlpine string HostPathCustom string )
var Arch string
var KubeVirtDefaultConfig v1.KubeVirtConfiguration
var NamespaceTestAlternative = "kubevirt-test-alternative"
NamespaceTestAlternative is used to test controller-namespace independency.
var NamespaceTestOperator = "kubevirt-test-operator"
NamespaceTestOperator is used to test if namespaces can still be deleted when kubevirt is uninstalled
var TestNamespaces = []string{util2.NamespaceTestDefault, NamespaceTestAlternative, NamespaceTestOperator}
Functions ¶
func AddBootOrderToDisk ¶ added in v0.6.0
func AddBootOrderToDisk(vmi *v1.VirtualMachineInstance, diskName string, bootorder *uint) *v1.VirtualMachineInstance
func AddCloudInitConfigDriveData ¶ added in v0.19.0
func AddCloudInitConfigDriveData(vmi *v1.VirtualMachineInstance, name, userData, networkData string, b64encode bool)
func AddCloudInitNoCloudData ¶ added in v0.19.0
func AddCloudInitNoCloudData(vmi *v1.VirtualMachineInstance, name, userData, networkData string, b64encode bool)
func AddConfigMapDisk ¶ added in v0.9.0
func AddConfigMapDisk(vmi *v1.VirtualMachineInstance, configMapName string, volumeName string)
func AddConfigMapDiskWithCustomLabel ¶ added in v0.29.0
func AddConfigMapDiskWithCustomLabel(vmi *v1.VirtualMachineInstance, configMapName string, volumeName string, volumeLabel string)
func AddDataVolumeDisk ¶ added in v0.49.1
func AddDataVolumeDisk(vmi *v1.VirtualMachineInstance, diskName, dataVolumeName string) *v1.VirtualMachineInstance
func AddDownwardMetricsVolume ¶ added in v0.42.0
func AddDownwardMetricsVolume(vmi *v1.VirtualMachineInstance, volumeName string)
func AddEphemeralCdrom ¶ added in v0.12.0
func AddEphemeralCdrom(vmi *v1.VirtualMachineInstance, name string, bus string, image string) *v1.VirtualMachineInstance
func AddEphemeralDisk ¶ added in v0.3.0
func AddEphemeralDisk(vmi *v1.VirtualMachineInstance, name string, bus string, image string) *v1.VirtualMachineInstance
func AddExplicitPodNetworkInterface ¶ added in v0.7.0
func AddExplicitPodNetworkInterface(vmi *v1.VirtualMachineInstance)
func AddHostDisk ¶ added in v0.9.4
func AddHostDisk(vmi *v1.VirtualMachineInstance, path string, diskType v1.HostDiskType, name string)
func AddLabelDownwardAPIVolume ¶ added in v0.35.0
func AddLabelDownwardAPIVolume(vmi *v1.VirtualMachineInstance, volumeName string)
func AddLabelToNode ¶ added in v0.16.0
func AddPVCDisk ¶ added in v0.5.0
func AddPVCDisk(vmi *v1.VirtualMachineInstance, name string, bus string, claimName string) *v1.VirtualMachineInstance
func AddPVCFS ¶ added in v0.34.0
func AddPVCFS(vmi *v1.VirtualMachineInstance, name string, claimName string) *v1.VirtualMachineInstance
func AddSecretDisk ¶ added in v0.9.0
func AddSecretDisk(vmi *v1.VirtualMachineInstance, secretName string, volumeName string)
func AddSecretDiskWithCustomLabel ¶ added in v0.29.0
func AddSecretDiskWithCustomLabel(vmi *v1.VirtualMachineInstance, secretName string, volumeName string, volumeLabel string)
func AddServiceAccountDisk ¶ added in v0.9.2
func AddServiceAccountDisk(vmi *v1.VirtualMachineInstance, serviceAccountName string)
func AddUserData ¶ added in v0.9.0
func AddUserData(vmi *v1.VirtualMachineInstance, name string, userData string)
func AddVolumeAndVerify ¶ added in v0.47.0
func AddVolumeAndVerify(virtClient kubecli.KubevirtClient, storageClass string, vm *v1.VirtualMachine, addVMIOnly bool) string
func AdjustKubeVirtResource ¶ added in v0.29.0
func AdjustKubeVirtResource()
func AfterTestSuitCleanup ¶
func AfterTestSuitCleanup()
func AppendEmptyDisk ¶ added in v0.16.0
func AppendEmptyDisk(vmi *v1.VirtualMachineInstance, diskName, busName, diskSize string)
func ApplyRawManifest ¶ added in v0.12.0
func ApplyRawManifest(object unstructured.Unstructured) error
func ArchiveToFile ¶ added in v0.51.0
func BeforeTestCleanup ¶
func BeforeTestCleanup()
func BeforeTestSuitSetup ¶
func BeforeTestSuitSetup(_ []byte)
func CalculateNamespaces ¶ added in v0.34.0
func CalculateNamespaces()
CalculateNamespaces checks on which ginkgo gest node the tests are run and sets the namespaces accordingly
func CallUrlOnPod ¶ added in v0.30.5
func CheckCloudInitMetaData ¶ added in v0.46.0
func CheckCloudInitMetaData(vmi *v1.VirtualMachineInstance, testFile, testData string)
func CleanNodes ¶ added in v0.16.0
func CleanNodes()
func ClearDedicatedMigrationNetwork ¶ added in v0.49.0
func ConfirmVMIPostMigration ¶ added in v0.35.0
func ConfirmVMIPostMigration(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance, migrationUID string) *v1.VirtualMachineInstance
func ContainsCrt ¶ added in v0.29.0
func CopyAlpineWithNonQEMUPermissions ¶ added in v0.48.0
func CopyAlpineWithNonQEMUPermissions() (dstPath, nodeName string)
func CopyFromPod ¶ added in v0.46.0
func CreateAllSeparateDeviceHostPathPvs ¶ added in v0.44.2
func CreateAllSeparateDeviceHostPathPvs(osName string)
func CreateArchive ¶ added in v0.51.0
func CreateBlockPVC ¶ added in v0.49.1
func CreateBlockPVC(virtClient kubecli.KubevirtClient, name string, size resource.Quantity) *k8sv1.PersistentVolumeClaim
func CreateCommandWithNS ¶ added in v0.9.5
func CreateConfigMap ¶ added in v0.9.0
func CreateErrorDisk ¶ added in v0.44.1
func CreateFaultyDisk ¶ added in v0.41.1
func CreateFaultyDisk(nodeName, deviceName string)
func CreateHostDiskImage ¶ added in v0.9.0
func CreateHostPathPVC ¶ added in v0.11.0
func CreateHostPathPVC(os, size string)
func CreateHostPathPv ¶ added in v0.6.1
func CreateHostPathPvWithSizeAndStorageClass ¶ added in v0.49.1
func CreateNFSPvAndPvc ¶ added in v0.19.0
func CreatePVC ¶ added in v0.5.0
func CreatePVC(os, size, storageClass string, recycledPV bool) *k8sv1.PersistentVolumeClaim
func CreatePVandPVCwithFaultyDisk ¶ added in v0.41.1
func CreatePVandPVCwithFaultyDisk(nodeName, devicePath, namespace string) (*corev1.PersistentVolume, *corev1.PersistentVolumeClaim, error)
func CreatePVandPVCwithSCSIDisk ¶ added in v0.48.0
func CreatePVandPVCwithSCSIDisk(nodeName, devicePath, namespace, storageClass, pvName, pvcName string) (*corev1.PersistentVolume, *corev1.PersistentVolumeClaim, error)
func CreatePodAndWaitUntil ¶ added in v0.34.0
func CreateRuntimeClass ¶ added in v0.44.1
func CreateRuntimeClass(name, handler string) (*nodev1.RuntimeClass, error)
func CreateSCSIDisk ¶ added in v0.48.0
CreateSCSIDisk creates a SCSI disk using the scsi_debug module. This function should be used only to check SCSI disk functionalities and not for creating a filesystem or any data. The disk is stored in ram and it isn't suitable for storing large amount of data.
func CreateSecret ¶ added in v0.9.0
func CreateStorageClass ¶ added in v0.49.1
func CreateStorageClass(name string, bindingMode *storagev1.VolumeBindingMode)
func CreateVmiOnNode ¶ added in v0.47.0
func CreateVmiOnNode(vmi *v1.VirtualMachineInstance, nodeName string) *v1.VirtualMachineInstance
CreateVmiOnNode creates a VMI on the specified node
func CreateVmiOnNodeLabeled ¶ added in v0.49.1
func CreateVmiOnNodeLabeled(vmi *v1.VirtualMachineInstance, nodeLabel, labelValue string) *v1.VirtualMachineInstance
CreateVmiOnNodeLabeled creates a VMI a node that has a give label set to a given value
func DeleteAllSeparateDeviceHostPathPvs ¶ added in v0.44.2
func DeleteAllSeparateDeviceHostPathPvs()
func DeleteAlpineWithNonQEMUPermissions ¶ added in v0.48.0
func DeleteAlpineWithNonQEMUPermissions()
func DeleteConfigMap ¶ added in v0.9.0
func DeleteConfigMap(name string)
func DeletePvAndPvc ¶ added in v0.9.2
func DeletePvAndPvc(name string)
func DeleteRawManifest ¶ added in v0.12.0
func DeleteRawManifest(object unstructured.Unstructured) error
func DeleteRuntimeClass ¶ added in v0.44.1
func DeleteSecret ¶ added in v0.9.0
func DeleteSecret(name string)
func DeleteStorageClass ¶ added in v0.49.1
func DeleteStorageClass(name string)
func DeployTestingInfrastructure ¶ added in v0.12.0
func DeployTestingInfrastructure()
func DeprecatedBeforeAll
deprecated
added in
v0.52.0
func DeprecatedBeforeAll(fn func())
Deprecated: DeprecatedBeforeAll must not be used. Tests need to be self-contained to allow sane cleanup, accurate reporting and parallel execution.
func DetectLatestUpstreamOfficialTag ¶ added in v0.31.0
func DisableFeatureGate ¶ added in v0.20.0
func DisableFeatureGate(feature string)
func DryRunCreate ¶ added in v0.47.0
func DryRunPatch ¶ added in v0.47.0
func DryRunUpdate ¶ added in v0.47.0
func EnableFeatureGate ¶ added in v0.20.0
func EncodePrivateKeyToPEM ¶ added in v0.19.0
func EncodePrivateKeyToPEM(privateKey *rsa.PrivateKey) []byte
EncodePrivateKeyToPEM encodes Private Key from RSA to PEM format
func EnsureKVMPresent ¶ added in v0.7.0
func EnsureKVMPresent()
func EnsureNoMigrationMetadataInPersistentXML ¶ added in v0.41.4
func EnsureNoMigrationMetadataInPersistentXML(vmi *v1.VirtualMachineInstance)
func EnsurePodsCertIsSynced ¶ added in v0.29.0
EnsurePodsCertIsSynced waits until new certificates are rolled out to all pods which are matching the specified labelselector. Once all certificates are in sync, the final secret is returned
func ExecuteCommandInVirtHandlerPod ¶ added in v0.41.1
func ExecuteCommandOnPod ¶ added in v0.4.1
func ExecuteCommandOnPodV2 ¶ added in v0.9.0
func ExpectMigrationSuccess ¶ added in v0.36.3
func ExpectMigrationSuccess(virtClient kubecli.KubevirtClient, migration *v1.VirtualMachineInstanceMigration, timeout int) string
func ExpectResourceVersionToBeLessEqualThanConfigVersion ¶ added in v0.52.0
func FixErrorDevice ¶ added in v0.44.1
func FixErrorDevice(nodeName string)
func FormatIPForURL ¶ added in v0.29.0
func ForwardPorts ¶ added in v0.17.0
func GenerateHelloWorldServer ¶ added in v0.19.0
func GenerateHelloWorldServer(vmi *v1.VirtualMachineInstance, testPort int, protocol string)
func GenerateMigrationCNINetworkAttachmentDefinition ¶ added in v0.49.0
func GenerateMigrationCNINetworkAttachmentDefinition() *k8snetworkplumbingwgv1.NetworkAttachmentDefinition
func GeneratePrivateKey ¶ added in v0.19.0
func GeneratePrivateKey(bitSize int) (*rsa.PrivateKey, error)
GeneratePrivateKey creates a RSA Private Key of specified byte size
func GeneratePublicKey ¶ added in v0.19.0
GeneratePublicKey will return in the format "ssh-rsa ..."
func GenerateRandomMac ¶ added in v0.26.0
func GenerateRandomMac() (net.HardwareAddr, error)
func GenerateTemplateJson ¶ added in v0.7.0
func GenerateVMIJson ¶ added in v0.6.1
func GenerateVMIJson(vmi *v1.VirtualMachineInstance, generateDirectory string) (string, error)
func GenerateVMJson ¶ added in v0.17.0
func GenerateVMJson(vm *v1.VirtualMachine, generateDirectory string) (string, error)
func GetBundleFromConfigMap ¶ added in v0.29.0
func GetBundleFromConfigMap(configMapName string) ([]byte, []*x509.Certificate)
func GetCertFromSecret ¶ added in v0.29.0
func GetCertsForPods ¶ added in v0.29.0
GetCertsForPods returns the used certificates for all pods matching the label selector
func GetComputeContainerOfPod ¶ added in v0.19.0
func GetContainerDiskContainerOfPod ¶ added in v0.19.0
func GetContainerOfPod ¶ added in v0.19.0
func GetFedoraToolsGuestAgentBlacklistUserData ¶ added in v0.36.3
func GetHighestCPUNumberAmongNodes ¶ added in v0.20.7
func GetHighestCPUNumberAmongNodes(virtClient kubecli.KubevirtClient) int
func GetIdOfLauncher ¶ added in v0.52.0
func GetIdOfLauncher(vmi *v1.VirtualMachineInstance) string
func GetK8sCmdClient ¶ added in v0.17.0
func GetK8sCmdClient() string
func GetKubernetesApiServiceIp ¶ added in v0.42.0
func GetKubernetesApiServiceIp(virtClient kubecli.KubevirtClient) (string, error)
func GetListOfManifests ¶ added in v0.12.0
func GetNodeDrainKey ¶ added in v0.26.5
func GetNodeDrainKey() string
func GetNodeWithHugepages ¶ added in v0.6.1
func GetNodeWithHugepages(virtClient kubecli.KubevirtClient, hugepages k8sv1.ResourceName) *k8sv1.Node
func GetNodesWithKVM ¶ added in v0.29.0
func GetPodByVirtualMachineInstance ¶ added in v0.17.0
func GetPodByVirtualMachineInstance(vmi *v1.VirtualMachineInstance) *k8sv1.Pod
func GetPodsCertIfSynced ¶ added in v0.29.0
func GetPodsCertIfSynced(labelSelector string, namespace string, port string) (cert []byte, synced bool, err error)
GetPodsCertIfSynced returns the certificate for all matching pods once all of them use the same certificate
func GetPodsCgroupVersion ¶ added in v0.50.0
func GetPodsCgroupVersion(pod *k8sv1.Pod, virtClient kubecli.KubevirtClient) cgroup.CgroupVersion
func GetPolicyMatchedToVmi ¶ added in v0.49.0
func GetPolicyMatchedToVmi(name string, vmi *v1.VirtualMachineInstance, namespace *k8sv1.Namespace, matchingVmiLabels, matchingNSLabels int) *migrationsv1.MigrationPolicy
func GetRWOBlockStorageClass ¶ added in v0.49.1
func GetRWOFileSystemStorageClass ¶ added in v0.49.1
func GetRWXBlockStorageClass ¶ added in v0.49.1
func GetRWXFileSystemStorageClass ¶ added in v0.49.1
func GetRunningPodByLabel ¶ added in v0.3.0
func GetRunningPodByVirtualMachineInstance ¶ added in v0.8.0
func GetRunningPodByVirtualMachineInstance(vmi *v1.VirtualMachineInstance, namespace string) *k8sv1.Pod
func GetRunningVMIDomainSpec ¶ added in v0.28.0
func GetRunningVMIDomainSpec(vmi *v1.VirtualMachineInstance) (*launcherApi.DomainSpec, error)
func GetRunningVirtualMachineInstanceDomainXML ¶ added in v0.9.2
func GetRunningVirtualMachineInstanceDomainXML(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance) (string, error)
func GetSnapshotStorageClass ¶ added in v0.49.1
func GetSupportedCPUFeatures ¶ added in v0.40.0
func GetSupportedCPUModels ¶ added in v0.40.0
func GetUpstreamReleaseAssetURL ¶ added in v0.48.0
func GetVMIsCgroupVersion ¶ added in v0.50.0
func GetVMIsCgroupVersion(vmi *v1.VirtualMachineInstance, virtClient kubecli.KubevirtClient) cgroup.CgroupVersion
func GetVmPodName ¶ added in v0.15.0
func GetVmPodName(virtCli kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance) string
func HasDataVolumeCRD ¶ added in v0.17.0
func HasDataVolumeCRD() bool
func HasExperimentalIgnitionSupport ¶ added in v0.17.3
func HasExperimentalIgnitionSupport() bool
func IsLauncherCapabilityDropped ¶ added in v0.36.0
func IsLauncherCapabilityDropped(capability k8sv1.Capability) bool
func IsLauncherCapabilityValid ¶ added in v0.30.4
func IsLauncherCapabilityValid(capability k8sv1.Capability) bool
func IsRunningOnKindInfra ¶ added in v0.29.0
func IsRunningOnKindInfra() bool
func IsStorageClassBindingModeWaitForFirstConsumer ¶ added in v0.49.1
func IsUsingBuiltinNodeDrainKey ¶ added in v0.29.0
func IsUsingBuiltinNodeDrainKey() bool
func LibvirtDomainIsPaused ¶ added in v0.41.0
func LibvirtDomainIsPaused(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance) (bool, error)
func LibvirtDomainIsPersistent ¶ added in v0.36.3
func LibvirtDomainIsPersistent(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance) (bool, error)
func LoginToVM ¶ added in v0.40.0
func LoginToVM(vmi *v1.VirtualMachineInstance, loginTo console.LoginToFunction) *v1.VirtualMachineInstance
func MountCloudInitFunc ¶ added in v0.46.0
func MountCloudInitFunc(devName string) func(*v1.VirtualMachineInstance)
func NewHTTPServerPod ¶ added in v0.34.0
func NewHelloWorldJobHTTP ¶ added in v0.33.0
NewHelloWorldJobHTTP gets an IP address and a port, which it uses to create a pod. This pod tries to contact the host on the provided port, over HTTP. On success - it expects to receive "Hello World!".
func NewHelloWorldJobTCP ¶ added in v0.51.0
NewHelloWorldJob takes a DNS entry or an IP and a port which it will use to create a job which tries to contact the host on the provided port. It expects to receive "Hello World!" to succeed.
func NewHelloWorldJobUDP ¶ added in v0.6.0
NewHelloWorldJobUDP takes a DNS entry or an IP and a port which it will use create a pod which tries to contact the host on the provided port. It expects to receive "Hello UDP World!" to succeed. Note that in case of UDP, the server will not see the connection unless something is sent over it However, netcat does not work well with UDP and closes before the answer arrives, we make netcat wait until the defined timeout is expired to prevent this from happening.
func NewJob ¶ added in v0.33.0
func NewJob(name string, cmd, args []string, retry, ttlAfterFinished int32, timeout int64) *batchv1.Job
NewJob creates a job configuration that runs a single Pod. A name is used for the job & pod while the command and its arguments are passed to the pod for execution. In addition, the following arguments control the job behavior: retry: The number of times the job should try and run the pod. ttlAfterFinished: The period of time between the job finishing and its auto-deletion.
Make sure to leave enough time for the reporter to collect the logs.
timeout: The overall time at which the job is terminated, regardless of it finishing or not.
func NewRandomBlankDataVolume ¶ added in v0.36.0
func NewRandomBlankDataVolume(namespace, storageClass, size string, accessMode k8sv1.PersistentVolumeAccessMode, volumeMode k8sv1.PersistentVolumeMode) *cdiv1.DataVolume
func NewRandomBlockDataVolumeWithRegistryImport ¶ added in v0.49.1
func NewRandomBlockDataVolumeWithRegistryImport(imageUrl, namespace string, accessMode k8sv1.PersistentVolumeAccessMode) *cdiv1.DataVolume
func NewRandomDataVolumeWithPVCSource ¶ added in v0.20.0
func NewRandomDataVolumeWithPVCSource(sourceNamespace, sourceName, targetNamespace string, accessMode k8sv1.PersistentVolumeAccessMode) *cdiv1.DataVolume
func NewRandomDataVolumeWithRegistryImport ¶ added in v0.35.0
func NewRandomDataVolumeWithRegistryImport(imageUrl, namespace string, accessMode k8sv1.PersistentVolumeAccessMode) *cdiv1.DataVolume
func NewRandomDataVolumeWithRegistryImportInStorageClass ¶ added in v0.44.2
func NewRandomDataVolumeWithRegistryImportInStorageClass(imageUrl, namespace, storageClass string, accessMode k8sv1.PersistentVolumeAccessMode, volumeMode k8sv1.PersistentVolumeMode) *cdiv1.DataVolume
func NewRandomFedoraVMI ¶ added in v0.39.0
func NewRandomFedoraVMI() *v1.VirtualMachineInstance
func NewRandomFedoraVMIWithBlacklistGuestAgent ¶ added in v0.36.3
func NewRandomFedoraVMIWithBlacklistGuestAgent(commands string) *v1.VirtualMachineInstance
func NewRandomFedoraVMIWithDmidecode ¶ added in v0.22.0
func NewRandomFedoraVMIWithDmidecode() *v1.VirtualMachineInstance
func NewRandomFedoraVMIWithGuestAgent ¶ added in v0.39.0
func NewRandomFedoraVMIWithGuestAgent() *v1.VirtualMachineInstance
func NewRandomFedoraVMIWithVirtWhatCpuidHelper ¶ added in v0.34.0
func NewRandomFedoraVMIWithVirtWhatCpuidHelper() *v1.VirtualMachineInstance
func NewRandomMigration ¶ added in v0.9.2
func NewRandomMigration(vmiName string, namespace string) *v1.VirtualMachineInstanceMigration
func NewRandomReplicaSetFromVMI ¶ added in v0.6.1
func NewRandomReplicaSetFromVMI(vmi *v1.VirtualMachineInstance, replicas int32) *v1.VirtualMachineInstanceReplicaSet
func NewRandomVMI ¶ added in v0.6.1
func NewRandomVMI() *v1.VirtualMachineInstance
func NewRandomVMIWithCDRom ¶ added in v0.6.1
func NewRandomVMIWithCDRom(claimName string) *v1.VirtualMachineInstance
func NewRandomVMIWithConfigMap ¶ added in v0.9.0
func NewRandomVMIWithConfigMap(configMapName string) *v1.VirtualMachineInstance
func NewRandomVMIWithDataVolume ¶ added in v0.8.0
func NewRandomVMIWithDataVolume(dataVolumeName string) *v1.VirtualMachineInstance
func NewRandomVMIWithEFIBootloader ¶ added in v0.14.0
func NewRandomVMIWithEFIBootloader() *v1.VirtualMachineInstance
func NewRandomVMIWithEphemeralDisk ¶ added in v0.6.1
func NewRandomVMIWithEphemeralDisk(containerImage string) *v1.VirtualMachineInstance
func NewRandomVMIWithEphemeralDiskAndConfigDriveUserdata ¶ added in v0.19.0
func NewRandomVMIWithEphemeralDiskAndConfigDriveUserdata(containerImage string, userData string) *v1.VirtualMachineInstance
func NewRandomVMIWithEphemeralDiskAndConfigDriveUserdataHighMemory ¶ added in v0.19.0
func NewRandomVMIWithEphemeralDiskAndConfigDriveUserdataHighMemory(containerImage string, userData string) *v1.VirtualMachineInstance
func NewRandomVMIWithEphemeralDiskAndConfigDriveUserdataNetworkData ¶ added in v0.19.0
func NewRandomVMIWithEphemeralDiskAndConfigDriveUserdataNetworkData(containerImage, userData, networkData string, b64encode bool) *v1.VirtualMachineInstance
func NewRandomVMIWithEphemeralDiskAndUserdata ¶ added in v0.6.1
func NewRandomVMIWithEphemeralDiskAndUserdata(containerImage string, userData string) *v1.VirtualMachineInstance
func NewRandomVMIWithEphemeralDiskAndUserdataHighMemory ¶ added in v0.6.1
func NewRandomVMIWithEphemeralDiskAndUserdataHighMemory(containerImage string, userData string) *v1.VirtualMachineInstance
func NewRandomVMIWithEphemeralDiskAndUserdataNetworkData ¶ added in v0.14.0
func NewRandomVMIWithEphemeralDiskAndUserdataNetworkData(containerImage, userData, networkData string, b64encode bool) *v1.VirtualMachineInstance
func NewRandomVMIWithEphemeralDiskHighMemory ¶ added in v0.6.1
func NewRandomVMIWithEphemeralDiskHighMemory(containerImage string) *v1.VirtualMachineInstance
func NewRandomVMIWithEphemeralPVC ¶ added in v0.6.1
func NewRandomVMIWithEphemeralPVC(claimName string) *v1.VirtualMachineInstance
func NewRandomVMIWithFSFromDataVolume ¶ added in v0.34.0
func NewRandomVMIWithFSFromDataVolume(dataVolumeName string) *v1.VirtualMachineInstance
func NewRandomVMIWithHostDisk ¶ added in v0.9.0
func NewRandomVMIWithHostDisk(diskPath string, diskType v1.HostDiskType, nodeName string) *v1.VirtualMachineInstance
func NewRandomVMIWithNS ¶ added in v0.6.1
func NewRandomVMIWithNS(namespace string) *v1.VirtualMachineInstance
func NewRandomVMIWithPVC ¶ added in v0.6.1
func NewRandomVMIWithPVC(claimName string) *v1.VirtualMachineInstance
func NewRandomVMIWithPVCAndUserData ¶ added in v0.34.0
func NewRandomVMIWithPVCAndUserData(claimName, userData string) *v1.VirtualMachineInstance
func NewRandomVMIWithPVCFS ¶ added in v0.34.0
func NewRandomVMIWithPVCFS(claimName string) *v1.VirtualMachineInstance
func NewRandomVMIWithSecret ¶ added in v0.9.0
func NewRandomVMIWithSecret(secretName string) *v1.VirtualMachineInstance
func NewRandomVMIWithSecureBoot ¶ added in v0.30.4
func NewRandomVMIWithSecureBoot() *v1.VirtualMachineInstance
func NewRandomVMIWithServiceAccount ¶ added in v0.9.2
func NewRandomVMIWithServiceAccount(serviceAccountName string) *v1.VirtualMachineInstance
func NewRandomVMIWithWatchdog ¶ added in v0.6.1
func NewRandomVMIWithWatchdog() *v1.VirtualMachineInstance
func NewRandomVMWithCloneDataVolume ¶ added in v0.20.0
func NewRandomVMWithCloneDataVolume(sourceNamespace, sourceName, targetNamespace string) *v1.VirtualMachine
func NewRandomVMWithDataVolume ¶ added in v0.8.0
func NewRandomVMWithDataVolume(imageUrl string, namespace string) *v1.VirtualMachine
func NewRandomVMWithDataVolumeAndUserData ¶ added in v0.44.1
func NewRandomVMWithDataVolumeAndUserData(dataVolume *cdiv1.DataVolume, userData string) *v1.VirtualMachine
func NewRandomVMWithDataVolumeAndUserDataInStorageClass ¶ added in v0.34.0
func NewRandomVMWithDataVolumeAndUserDataInStorageClass(imageUrl, namespace, userData, storageClass string) *v1.VirtualMachine
func NewRandomVMWithDataVolumeWithRegistryImport ¶ added in v0.44.2
func NewRandomVMWithDataVolumeWithRegistryImport(imageUrl, namespace, storageClass string, accessMode k8sv1.PersistentVolumeAccessMode) *v1.VirtualMachine
func NewRandomVMWithEphemeralDisk ¶
func NewRandomVMWithEphemeralDisk(containerImage string) *v1.VirtualMachine
func NewRandomVirtualMachine ¶ added in v0.8.0
func NewRandomVirtualMachine(vmi *v1.VirtualMachineInstance, running bool) *v1.VirtualMachine
func NewRandomVirtualMachineInstanceWithBlockDisk ¶ added in v0.49.1
func NewRandomVirtualMachineInstanceWithBlockDisk(imageUrl, namespace string, accessMode k8sv1.PersistentVolumeAccessMode) (*v1.VirtualMachineInstance, *cdiv1.DataVolume)
func NewRandomVirtualMachineInstanceWithDisk ¶ added in v0.49.1
func NewRandomVirtualMachineInstanceWithDisk(imageUrl, namespace, sc string, accessMode k8sv1.PersistentVolumeAccessMode, volMode k8sv1.PersistentVolumeMode) (*v1.VirtualMachineInstance, *cdiv1.DataVolume)
func NewRandomVirtualMachineInstanceWithFileDisk ¶ added in v0.49.1
func NewRandomVirtualMachineInstanceWithFileDisk(imageUrl, namespace string, accessMode k8sv1.PersistentVolumeAccessMode) (*v1.VirtualMachineInstance, *cdiv1.DataVolume)
func NewRepeatableVirtctlCommand ¶ added in v0.4.0
func NewTCPServerPod ¶ added in v0.34.0
func NewVirtctlCommand ¶ added in v0.4.0
func NodeNameWithHandler ¶ added in v0.41.1
func NodeNameWithHandler() string
func NotDeleted ¶ added in v0.5.0
func NotDeleted(vmis *v1.VirtualMachineInstanceList) (notDeleted []v1.VirtualMachineInstance)
func NotDeletedVMs ¶ added in v0.49.0
func NotDeletedVMs(vms *v1.VirtualMachineList) (notDeleted []v1.VirtualMachine)
func PrometheusRuleEnabled ¶ added in v0.26.0
func PrometheusRuleEnabled() bool
PrometheusRuleEnabled returns true if the PrometheusRule CRD is enabled and false otherwise.
func RandTmpDir ¶ added in v0.29.0
func RandTmpDir() string
func ReadManifestYamlFile ¶ added in v0.12.0
func ReadManifestYamlFile(pathToManifest string) []unstructured.Unstructured
func RemoveFaultyDisk ¶ added in v0.41.1
func RemoveFaultyDisk(nodeName, deviceName string)
func RemoveHostDiskImage ¶ added in v0.9.0
func RemoveLabelFromNode ¶ added in v0.16.0
func RemoveSCSIDisk ¶ added in v0.48.0
func RemoveSCSIDisk(nodeName, address string)
func RenderHostPathPod ¶ added in v0.33.0
func RenderHostPathPod(podName string, dir string, hostPathType k8sv1.HostPathType, mountPropagation k8sv1.MountPropagationMode, cmd []string, args []string) *k8sv1.Pod
func RenderPrivilegedPod ¶ added in v0.39.0
func RestoreKubeVirtResource ¶ added in v0.29.0
func RestoreKubeVirtResource()
func RetryIfModified ¶ added in v0.22.0
func RetryWithMetadataIfModified ¶ added in v0.23.0
func RetryWithMetadataIfModified(objectMeta metav1.ObjectMeta, do func(objectMeta metav1.ObjectMeta) error) (err error)
func RunCommand ¶ added in v0.8.0
func RunCommandOnVmiPod ¶ added in v0.6.3
func RunCommandOnVmiPod(vmi *v1.VirtualMachineInstance, command []string) string
RunCommandOnVmiPod runs specified command on the virt-launcher pod
func RunCommandOnVmiTargetPod ¶ added in v0.36.4
func RunCommandOnVmiTargetPod(vmi *v1.VirtualMachineInstance, command []string) (string, error)
RunCommandOnVmiTargetPod runs specified command on the target virt-launcher pod of a migration
func RunCommandPipe ¶ added in v0.9.2
func RunCommandPipeWithNS ¶ added in v0.9.2
func RunCommandWithNS ¶ added in v0.9.2
func RunCommandWithNSAndInput ¶ added in v0.20.0
func RunMigration ¶ added in v0.49.0
func RunMigration(virtClient kubecli.KubevirtClient, migration *v1.VirtualMachineInstanceMigration) *v1.VirtualMachineInstanceMigration
func RunMigrationAndExpectCompletion ¶ added in v0.35.0
func RunMigrationAndExpectCompletion(virtClient kubecli.KubevirtClient, migration *v1.VirtualMachineInstanceMigration, timeout int) string
func RunPodAndExpectCompletion ¶ added in v0.48.0
func RunVMI ¶ added in v0.9.0
func RunVMI(vmi *v1.VirtualMachineInstance, timeout int) *v1.VirtualMachineInstance
func RunVMIAndExpectLaunch ¶ added in v0.9.0
func RunVMIAndExpectLaunch(vmi *v1.VirtualMachineInstance, timeout int) *v1.VirtualMachineInstance
func RunVMIAndExpectLaunchIgnoreWarnings ¶ added in v0.29.0
func RunVMIAndExpectLaunchIgnoreWarnings(vmi *v1.VirtualMachineInstance, timeout int) *v1.VirtualMachineInstance
func RunVMIAndExpectLaunchWithDataVolume ¶ added in v0.40.0
func RunVMIAndExpectLaunchWithDataVolume(vmi *v1.VirtualMachineInstance, dv *cdiv1.DataVolume, timeout int) *v1.VirtualMachineInstance
func RunVMIAndExpectScheduling ¶ added in v0.17.0
func RunVMIAndExpectScheduling(vmi *v1.VirtualMachineInstance, timeout int) *v1.VirtualMachineInstance
func Running ¶ added in v0.35.0
func Running(vmis *v1.VirtualMachineInstanceList) (running []v1.VirtualMachineInstance)
func ServiceMonitorEnabled ¶ added in v0.20.6
func ServiceMonitorEnabled() bool
func SetDataVolumeForceBindAnnotation ¶ added in v0.49.1
func SetDataVolumeForceBindAnnotation(dv *cdiv1.DataVolume)
func SetDedicatedMigrationNetwork ¶ added in v0.49.0
func ShouldAllowEmulation ¶ added in v0.45.0
func ShouldAllowEmulation(virtClient kubecli.KubevirtClient) bool
func SkipIfNoCmd ¶ added in v0.8.0
func SkipIfNoCmd(cmdName string)
func StartHTTPServer ¶ added in v0.11.0
func StartHTTPServer(vmi *v1.VirtualMachineInstance, port int)
func StartHTTPServerPod ¶ added in v0.34.0
func StartHTTPServerWithSourceIp ¶ added in v0.52.0
func StartHTTPServerWithSourceIp(vmi *v1.VirtualMachineInstance, port int, sourceIP string)
func StartPythonHttpServer ¶ added in v0.37.0
func StartPythonHttpServer(vmi *v1.VirtualMachineInstance, port int)
func StartTCPServer ¶ added in v0.11.0
func StartTCPServer(vmi *v1.VirtualMachineInstance, port int)
func StartTCPServerPod ¶ added in v0.34.0
func StartVirtualMachine ¶ added in v0.8.0
func StartVirtualMachine(vm *v1.VirtualMachine) *v1.VirtualMachine
func StopVirtualMachine ¶ added in v0.8.0
func StopVirtualMachine(vm *v1.VirtualMachine) *v1.VirtualMachine
func StopVirtualMachineWithTimeout ¶ added in v0.41.0
func StopVirtualMachineWithTimeout(vm *v1.VirtualMachine, timeout time.Duration) *v1.VirtualMachine
func SynchronizedAfterTestSuiteCleanup ¶ added in v0.34.0
func SynchronizedAfterTestSuiteCleanup()
func SynchronizedBeforeTestSetup ¶ added in v0.34.0
func SynchronizedBeforeTestSetup() []byte
func UnfinishedVMIPodSelector ¶ added in v0.6.1
func UnfinishedVMIPodSelector(vmi *v1.VirtualMachineInstance) metav1.ListOptions
func UpdateKubeVirtConfigValue ¶ added in v0.52.0
func UpdateKubeVirtConfigValue(kvConfig v1.KubeVirtConfiguration) *v1.KubeVirt
UpdateKubeVirtConfigValue updates the given configuration in the kubevirt custom resource
func UpdateKubeVirtConfigValueAndWait ¶ added in v0.35.0
func UpdateKubeVirtConfigValueAndWait(kvConfig v1.KubeVirtConfiguration) *v1.KubeVirt
UpdateKubeVirtConfigValueAndWait updates the given configuration in the kubevirt custom resource and then waits to allow the configuration events to be propagated to the consumers.
func VMILauncherIgnoreWarnings ¶ added in v0.43.0
func VMILauncherIgnoreWarnings(virtClient kubecli.KubevirtClient) func(vmi *v1.VirtualMachineInstance) *v1.VirtualMachineInstance
VMILauncherIgnoreWarnings waiting for the VMI to be up but ignoring warnings like a disconnected guest-agent
func VerifyVolumeAndDiskVMAdded ¶ added in v0.47.0
func VerifyVolumeAndDiskVMAdded(virtClient kubecli.KubevirtClient, vm *v1.VirtualMachine, volumeNames ...string)
func VerifyVolumeAndDiskVMIAdded ¶ added in v0.47.0
func VerifyVolumeAndDiskVMIAdded(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance, volumeNames ...string)
func VolumeExpansionAllowed ¶ added in v0.49.1
func WaitAgentConnected ¶ added in v0.19.0
func WaitAgentConnected(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance)
func WaitAgentDisconnected ¶ added in v0.48.0
func WaitAgentDisconnected(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance)
func WaitForAllPodsReady ¶ added in v0.12.0
func WaitForAllPodsReady(timeout time.Duration, listOptions metav1.ListOptions)
func WaitForConfigToBePropagatedToComponent ¶ added in v0.35.0
func WaitForJobToFail ¶ added in v0.33.0
WaitForJobToFail blocks until the given job finishes. On failure, it returns with a nil error, on success or timeout it returns with an error.
func WaitForJobToSucceed ¶ added in v0.33.0
WaitForJobToSucceed blocks until the given job finishes. On success, it returns with a nil error, on failure or timeout it returns with an error.
func WaitForMigrationToDisappearWithTimeout ¶ added in v0.16.0
func WaitForMigrationToDisappearWithTimeout(migration *v1.VirtualMachineInstanceMigration, seconds int)
func WaitForPodToDisappearWithTimeout ¶ added in v0.27.0
func WaitForSuccessfulVMIStart ¶ added in v0.6.1
func WaitForSuccessfulVMIStart(vmi runtime.Object) *v1.VirtualMachineInstance
func WaitForSuccessfulVMIStartIgnoreWarnings ¶ added in v0.6.1
func WaitForSuccessfulVMIStartIgnoreWarnings(vmi runtime.Object) *v1.VirtualMachineInstance
func WaitForSuccessfulVMIStartWithContext ¶ added in v0.35.0
func WaitForSuccessfulVMIStartWithContextIgnoreSelectedWarnings ¶ added in v0.40.0
func WaitForSuccessfulVMIStartWithTimeout ¶ added in v0.6.1
func WaitForSuccessfulVMIStartWithTimeout(vmi runtime.Object, seconds int) *v1.VirtualMachineInstance
func WaitForSuccessfulVMIStartWithTimeoutIgnoreWarnings ¶ added in v0.19.0
func WaitForSuccessfulVMIStartWithTimeoutIgnoreWarnings(vmi runtime.Object, seconds int) *v1.VirtualMachineInstance
func WaitForVMCondition ¶ added in v0.24.0
func WaitForVMCondition(virtClient kubecli.KubevirtClient, vm *v1.VirtualMachine, conditionType v1.VirtualMachineConditionType, timeoutSec int)
func WaitForVMConditionRemovedOrFalse ¶ added in v0.24.0
func WaitForVMConditionRemovedOrFalse(virtClient kubecli.KubevirtClient, vm *v1.VirtualMachine, conditionType v1.VirtualMachineConditionType, timeoutSec int)
func WaitForVMICondition ¶ added in v0.24.0
func WaitForVMICondition(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance, conditionType v1.VirtualMachineInstanceConditionType, timeoutSec int)
func WaitForVMIConditionRemovedOrFalse ¶ added in v0.24.0
func WaitForVMIConditionRemovedOrFalse(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance, conditionType v1.VirtualMachineInstanceConditionType, timeoutSec int)
func WaitForVMIStartOrFailed ¶ added in v0.36.0
func WaitForVMIStartOrFailed(obj runtime.Object, seconds int, wp WarningsPolicy) *v1.VirtualMachineInstance
Block until the specified VirtualMachineInstance reached either Failed or Running states
func WaitForVirtualMachineToDisappearWithTimeout ¶ added in v0.5.0
func WaitForVirtualMachineToDisappearWithTimeout(vmi *v1.VirtualMachineInstance, seconds int)
func WaitUntilVMIReady ¶ added in v0.8.0
func WaitUntilVMIReady(vmi *v1.VirtualMachineInstance, loginTo console.LoginToFunction) *v1.VirtualMachineInstance
func WaitUntilVMIReadyIgnoreSelectedWarnings ¶ added in v0.40.0
func WaitUntilVMIReadyIgnoreSelectedWarnings(vmi *v1.VirtualMachineInstance, loginTo console.LoginToFunction, warningsIgnoreList []string) *v1.VirtualMachineInstance
func WaitUntilVMIReadyWithContext ¶ added in v0.35.0
func WaitUntilVMIReadyWithContext(ctx context.Context, vmi *v1.VirtualMachineInstance, loginTo console.LoginToFunction) *v1.VirtualMachineInstance
func WaitUntilVMIReadyWithContextIgnoreSelectedWarnings ¶ added in v0.40.0
func WaitUntilVMIReadyWithContextIgnoreSelectedWarnings(ctx context.Context, vmi *v1.VirtualMachineInstance, loginTo console.LoginToFunction, warningsIgnoreList []string) *v1.VirtualMachineInstance
func WipeTestingInfrastructure ¶ added in v0.12.0
func WipeTestingInfrastructure()
Types ¶
type KubeVirtTestsConfiguration ¶ added in v0.16.0
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
type ObjectEventWatcher ¶
type ObjectEventWatcher struct {
// contains filtered or unexported fields
}
func NewObjectEventWatcher ¶
func NewObjectEventWatcher(object runtime.Object) *ObjectEventWatcher
func (*ObjectEventWatcher) SetWarningsPolicy ¶ added in v0.40.0
func (w *ObjectEventWatcher) SetWarningsPolicy(wp WarningsPolicy) *ObjectEventWatcher
func (*ObjectEventWatcher) SinceNow ¶
func (w *ObjectEventWatcher) SinceNow() *ObjectEventWatcher
SinceNow sets a watch starting point for events, from the moment on the connection to the apiserver was established.
func (*ObjectEventWatcher) SinceObjectResourceVersion ¶
func (w *ObjectEventWatcher) SinceObjectResourceVersion(object runtime.Object) *ObjectEventWatcher
SinceObjectResourceVersion takes the resource version of the passed in runtime object and takes it as the starting point for all events to watch for.
func (*ObjectEventWatcher) SinceResourceVersion ¶
func (w *ObjectEventWatcher) SinceResourceVersion(rv string) *ObjectEventWatcher
SinceResourceVersion sets the passed in resourceVersion as the starting point for all events to watch for.
func (*ObjectEventWatcher) SinceWatchedObjectResourceVersion ¶
func (w *ObjectEventWatcher) SinceWatchedObjectResourceVersion() *ObjectEventWatcher
SinceWatchedObjectResourceVersion takes the resource version of the runtime object which is watched, and takes it as the starting point for all events to watch for.
func (*ObjectEventWatcher) Timeout ¶
func (w *ObjectEventWatcher) Timeout(duration time.Duration) *ObjectEventWatcher
func (*ObjectEventWatcher) WaitNotFor ¶ added in v0.11.0
func (*ObjectEventWatcher) Watch ¶
func (w *ObjectEventWatcher) Watch(ctx context.Context, processFunc ProcessFunc, watchedDescription string)