# Functions
AddProvisionOnNodeToAnn adds 'kubevirt.io/provisionOnNode' annotaion.
ArchiveFiles creates a tar file that archives the given source files.
CacheTestsData fetch and cache data required for tests.
ClearInsecureRegistry undoes whatever SetInsecureRegistry does.
CopyConfigMap copies a ConfigMap.
CopyFileHostCertConfigMap copies the test file host configmap, it assumes the File host is in the CDI namespace.
CopyRegistryCertConfigMap copies the test registry configmap, it assumes the Registry host is in the CDI namespace.
CreateCertForTestService creates a TLS key/cert for a service, writes them to files and creates a config map containing the cert.
CreateDataVolumeFromDefinition is used by tests to create a testable Data Volume.
CreateExecutorPodWithPVC creates a Pod with the passed in PVC mounted under /pvc.
CreateExecutorPodWithPVCSpecificNode creates a Pod on a specific node with the passed in PVC mounted under /pvc.
CreatePod calls the Kubernetes API to create a Pod.
CreatePVCFromDefinition creates a PVC in the passed in namespace from the passed in PersistentVolumeClaim definition.
CreatePVFromDefinition creates a PV from the passed in PersistentVolume definition.
CreateSecretFromDefinition creates and returns a pointer ot a v1.Secret using a provided v1.Secret.
DeleteDataVolume deletes the DataVolume with the given name.
DeletePod deletes the passed in Pod from the passed in Namespace.
DeletePV deletes the passed in PV.
DeletePVC deletes the passed in PVC.
DeleteSecret ...
FindPodByPrefix finds the first pod which has the passed in prefix.
FindPVC Finds the passed in PVC.
FormatTestData accepts the path of a single file (srcFile) and attempts to generate an output file in the format defined by targetFormats (e.g.
GetSchedulableNode return a schedulable node from a nodes list.
GetServiceInNamespace retries get on service `name` in namespace `ns` until timeout or IsNotFound error.
GetServiceInNamespaceOrDie attempts to get the service in namespace `ns` by `name`.
GetServiceNodePortByName scans a service's nodePorts for a name matching the `name` parameter and returns the associated port integer or an error if not match is found.
GetServicePortByName scans a service's ports for names matching `name`.
GetServicesInNamespaceByLabel retries get of services in namespace `ns` by `labelSelector` until timeout.
IsExpectedNode waits to check if the specified pod is schedule on the specified node.
IsHostpathProvisioner returns true if hostpath-provisioner is the default storage class.
NewBlockPVCDefinition creates a PVC definition with volumeMode 'Block'.
NewCloningDataVolume initializes a DataVolume struct with PVC annotations.
NewDataVolumeCloneToBlockPV initializes a DataVolume for block cloning.
NewDataVolumeForBlankRawImage initializes a DataVolume struct for creating blank raw image.
NewDataVolumeForBlankRawImageBlock initializes a DataVolume struct for creating blank raw image for a block device.
NewDataVolumeForImageCloning initializes a DataVolume struct for cloning disk image.
NewDataVolumeForUpload initializes a DataVolume struct with Upload annotations.
NewDataVolumeWithArchiveContent initializes a DataVolume struct with 'archive' ContentType.
NewDataVolumeWithHTTPImport initializes a DataVolume struct with HTTP annotations.
NewDataVolumeWithHTTPImportToBlockPV initializes a DataVolume struct with HTTP annotations to import to block PV.
NewDataVolumeWithRegistryImport initializes a DataVolume struct with registry annotations.
NewPodWithPVC creates a new pod that mounts the given PVC.
NewPVCDefinition creates a PVC definition using the passed in name and requested size.
NewPVCDefinitionWithSelector creates a PVC definition.
NewPVDefinition creates a PV definition.
NewSecretDefinition provides a function to initialize a Secret data type with the provided options.
PersistentVolumeClaimFromDataVolume creates a PersistentVolumeClaim definition so we can use PersistentVolumeClaim for various operations.
PodGetNode returns the node on which a given pod is executing.
RequestUploadToken sends an upload token request to the server.
RunGoCLICommand egecutes gocli with given args.
SetInsecureRegistry sets the configmap entry to mark the registry as okay to be insecure.
UploadBlockPVCDefinition creates a PVC with the upload target annotation for block PV.
UploadPodName returns the name of the upload server pod associated with a PVC.
UploadPVCDefinition creates a PVC with the upload target annotation.
WaitForDataVolumePhase waits for DV's phase to be in a particular phase (Pending, Bound, or Lost).
WaitForDeploymentReplicasReady will wait for replicase to become ready and return an error if they do not.
WaitForDeploymentReplicasReadyOrDie adds the ability to fatal out if the replicas don't become ready.
WaitForPersistentVolumeClaimPhase waits for the PVC to be in a particular phase (Pending, Bound, or Lost).
WaitForPVC waits for a PVC.
WaitForPVCAnnotation waits for an anotation to appear on a PVC.
WaitForPVCAnnotationWithValue waits for an annotation with a specific value on a PVC.
WaitPodDeleted waits fo a pod to no longer exist returns whether the pod is deleted along with any error.
WaitPVCDeleted polls the specified PVC until timeout or it's not found, returns true if deleted in the specified timeout period, and any errors.
WaitPVCPodStatusFailed waits for the pod status annotation to be Failed.
WaitPVCPodStatusRunning waits for the pod status annotation to be Running.
WaitPVCPodStatusSucceeded waits for the pod status annotation to be Succeeded.
WaitPVCUploadPodStatusRunning waits for the upload server pod status annotation to be Running.
WaitTimeoutForPodFailed waits for pod to fail.
WaitTimeoutForPodReady waits for the given pod to be created and ready.
WaitTimeoutForPodStatus waits for the given pod to be created and have a expected status.
WaitTimeoutForPodSucceeded waits for pod to succeed.
WaitTimeoutForPVReady waits for the given pv to be created and ready.
WaitTimeoutForPVStatus waits for the given pv to be created and have a expected status.
# Constants
AccessKeyValue provides a username to use for http and S3 (see hack/build/docker/cdi-func-test-file-host-http/htpasswd).
CirrosURL provides the standard cirros image qcow image.
DefaultImagePath is the default destination for images created by CDI.
DefaultPvcMountPath is the default mount path used.
FileHostCertConfigMap is the ConfigMap where the cert fir the file host is stored.
FileHostName provides a deployment and service name for tests.
FileHostS3Bucket provides an S3 bucket name for tests (e.g.
HttpAuthPort provides a cdi-file-host service auth port for tests.
HttpNoAuthPort provides a cdi-file-host service no-auth port for tests, requires AccessKeyValue and SecretKeyValue.
HTTPRateLimitPort provides a cdi-file-host service rate limit port for tests, speed is limited to 25k/s to allow for testing slow connection behavior.
HTTPSPort is the https port of cdi-file-host.
HTTPSTinyCoreIsoURL provides a test (https) url for the tineyCore iso image.
InvalidQcowImagesURL provides a test url for invalid qcow images.
PodWaitForTime is the time to wait for Pod operations to complete.
RegistryCertConfigMap is the ConfigMap where the cert for the docker registry is stored.
RegistryHostName provides a deploymnet and service name for registry.
S3Port provides a cdi-file-host service S3 port, requires AccessKey and SecretKeyValue.
SecretKeyValue provides a password to use for http and S3 (see hack/build/docker/cdi-func-test-file-host-http/htpasswd).
TarArchiveURL provides a test url for a tar achive file.
TinyCoreIsoRegistryURL provides a test url for the tinycore.qcow2 image wrapped in docker container.
TinyCoreIsoURL provides a test url for the tineyCore iso image.
TinyCoreQcow2URLRateLimit provides a test url for the tineyCore iso image.
UploadFile is the file to upload.
UploadFileMD5 is the expected MD5 of the uploaded file.
UploadFileMD5100kbytes is the size of the image after being extended.
UploadFileSize is the size of UploadFile.
# Variables
DefaultNodeName the default node to use in tests.
DefaultStorageClass the defauld storage class used in tests.