provider

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigMapsManager added in v0.2.1

type ConfigMapsManager interface {
	FindFor(types.NamespacedName) (*corev1.ConfigMap, error)
	CreateFor(*corev1.ConfigMap, types.NamespacedName) error
	DeleteFor(types.NamespacedName) error
}

ConfigMapsManager defines operations on config maps

type DataVolumesManager added in v0.2.1

type DataVolumesManager interface {
	FindFor(types.NamespacedName) ([]*cdiv1.DataVolume, error)
	DeleteFor(types.NamespacedName) error
}

DataVolumesManager defines operations on datavolumes

type Mapper

type Mapper interface {
	CreateEmptyVM(vmName *string) *kubevirtv1.VirtualMachine
	ResolveVMName(targetVMName *string) *string
	MapVM(targetVMName *string, vmSpec *kubevirtv1.VirtualMachine) (*kubevirtv1.VirtualMachine, error)
	MapDataVolumes(targetVMName *string, filesystemOverhead cdiv1.FilesystemOverhead) (map[string]cdiv1.DataVolume, error)
	MapDisk(vmSpec *kubevirtv1.VirtualMachine, dv cdiv1.DataVolume)
}

Mapper is interface to be used for mapping external VM to kubevirt VM

type PodsManager added in v0.3.1

type PodsManager interface {
	FindFor(types.NamespacedName) (*corev1.Pod, error)
	CreateFor(*corev1.Pod, types.NamespacedName) error
	DeleteFor(types.NamespacedName) error
}

PodsManager defines operations on Pods

type Provider

type Provider interface {
	Init(*corev1.Secret, *v2vv1.VirtualMachineImport) error
	TestConnection() error
	Close()
	LoadVM(v2vv1.VirtualMachineImportSourceSpec) error
	PrepareResourceMapping(*v2vv1.ResourceMappingSpec, v2vv1.VirtualMachineImportSourceSpec)
	Validate() ([]v2vv1.VirtualMachineImportCondition, error)
	ValidateDiskStatus(string) (bool, error)
	StopVM(*v2vv1.VirtualMachineImport, rclient.Client) error
	CreateMapper() (Mapper, error)
	GetVMStatus() (VMStatus, error)
	GetVMName() (string, error)
	StartVM() error
	CleanUp(bool, *v2vv1.VirtualMachineImport, rclient.Client) error
	FindTemplate() (*oapiv1.Template, error)
	ProcessTemplate(*oapiv1.Template, *string, string) (*kubevirtv1.VirtualMachine, error)
	NeedsGuestConversion() bool
	GetGuestConversionPod() (*corev1.Pod, error)
	LaunchGuestConversionPod(*kubevirtv1.VirtualMachine, map[string]cdiv1.DataVolume) (*corev1.Pod, error)
	SupportsWarmMigration() bool
	CreateVMSnapshot() (string, error)
}

Provider defines the methods required by source providers for importing a VM

type SecretsManager added in v0.2.1

type SecretsManager interface {
	FindFor(types.NamespacedName) (*corev1.Secret, error)
	CreateFor(*corev1.Secret, types.NamespacedName) error
	DeleteFor(types.NamespacedName) error
}

SecretsManager defines operations on secrets

type VMStatus

type VMStatus string

VMStatus represents VM status

const (
	// VMStatusDown defines VM status representing stopped VM
	VMStatusDown VMStatus = "down"
	// VMStatusUp defines VM status representing running VM
	VMStatusUp VMStatus = "up"
)

type VirtualMachineManager added in v0.2.1

type VirtualMachineManager interface {
	FindFor(types.NamespacedName) (*kubevirtv1.VirtualMachine, error)
	DeleteFor(types.NamespacedName) error
}

VirtualMachineManager defines operations on datavolumes

Jump to

Keyboard shortcuts

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