imageupload

package
v1.0.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: Apache-2.0 Imports: 29 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// PodPhaseAnnotation is the annotation on a PVC containing the upload pod phase
	PodPhaseAnnotation = "cdi.kubevirt.io/storage.pod.phase"

	// PodReadyAnnotation tells whether the uploadserver pod is ready
	PodReadyAnnotation = "cdi.kubevirt.io/storage.pod.ready"

	//UploadProxyURIAsync is a URI of the upload proxy, the endpoint is asynchronous
	UploadProxyURIAsync = "/v1alpha1/upload-async"

	//UploadProxyURI is a URI of the upload proxy, the endpoint is synchronous for backwards compatibility
	UploadProxyURI = "/v1alpha1/upload"

	// ProvisioningFailed stores the 'ProvisioningFailed' event condition used for PVC error handling
	ProvisioningFailed = "ProvisioningFailed"
	// ErrClaimNotValid stores the 'ErrClaimNotValid' event condition used for DV error handling
	ErrClaimNotValid = "ErrClaimNotValid"
)

Variables

View Source
var UploadProcessingCompleteFunc processingCompleteFunc = waitUploadProcessingComplete

UploadProcessingCompleteFunc the function called while determining if post transfer processing is complete.

Functions

func ConstructUploadProxyPath added in v0.15.0

func ConstructUploadProxyPath(uploadProxyURL string) (string, error)

ConstructUploadProxyPath - receives uploadproxy address and concatenates to it URI

func ConstructUploadProxyPathAsync added in v0.26.1

func ConstructUploadProxyPathAsync(uploadProxyURL, token string, insecure bool) (string, error)

ConstructUploadProxyPathAsync - receives uploadproxy address and concatenates to it URI

func NewImageUploadCommand

func NewImageUploadCommand(clientConfig clientcmd.ClientConfig) *cobra.Command

NewImageUploadCommand returns a cobra.Command for handling the uploading of VM images

func SetDefaultHTTPClientCreator

func SetDefaultHTTPClientCreator()

SetDefaultHTTPClientCreator sets the http client creator back to default

func SetHTTPClientCreator

func SetHTTPClientCreator(f HTTPClientCreator)

SetHTTPClientCreator allows overriding the default http client useful for unit tests

Types

type HTTPClientCreator

type HTTPClientCreator func(bool) *http.Client

HTTPClientCreator is a function that creates http clients

Jump to

Keyboard shortcuts

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