Documentation ¶
Index ¶
- type OvirtProvider
- func (o *OvirtProvider) CleanUp(failure bool, cr *v2vv1.VirtualMachineImport, client rclient.Client) error
- func (o *OvirtProvider) Close()
- func (o *OvirtProvider) CreateMapper() (provider.Mapper, error)
- func (o *OvirtProvider) CreateVMSnapshot() (string, error)
- func (o *OvirtProvider) FindTemplate() (*templatev1.Template, error)
- func (o *OvirtProvider) GetGuestConversionPod() (*corev1.Pod, error)
- func (o *OvirtProvider) GetVMName() (string, error)
- func (o *OvirtProvider) GetVMStatus() (provider.VMStatus, error)
- func (o *OvirtProvider) GetVmiNamespacedName() types.NamespacedName
- func (o *OvirtProvider) Init(secret *corev1.Secret, instance *v2vv1.VirtualMachineImport) error
- func (o *OvirtProvider) LaunchGuestConversionPod(_ *kubevirtv1.VirtualMachine, _ map[string]cdiv1.DataVolume) (*corev1.Pod, error)
- func (o *OvirtProvider) LoadVM(sourceSpec v2vv1.VirtualMachineImportSourceSpec) error
- func (o *OvirtProvider) NeedsGuestConversion() bool
- func (o *OvirtProvider) PrepareResourceMapping(externalResourceMapping *v2vv1.ResourceMappingSpec, ...)
- func (o *OvirtProvider) ProcessTemplate(template *templatev1.Template, vmName *string, namespace string) (*kubevirtv1.VirtualMachine, error)
- func (o *OvirtProvider) StartVM() error
- func (o *OvirtProvider) StopVM(instance *v2vv1.VirtualMachineImport, rclient rclient.Client) error
- func (o *OvirtProvider) SupportsWarmMigration() bool
- func (o *OvirtProvider) TestConnection() error
- func (o *OvirtProvider) Validate() ([]v2vv1.VirtualMachineImportCondition, error)
- func (o *OvirtProvider) ValidateDiskStatus(diskName string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OvirtProvider ¶
type OvirtProvider struct {
// contains filtered or unexported fields
}
OvirtProvider is Ovirt implementation of the Provider interface to support importing VM from ovirt
func NewOvirtProvider ¶
func NewOvirtProvider(vmiObjectMeta metav1.ObjectMeta, vmiTypeMeta metav1.TypeMeta, client client.Client, tempClient *tempclient.TemplateV1Client, factory pclient.Factory, kvConfigProvider kvConfig.KubeVirtConfigProvider, ctrlConfig ctrlConfig.ControllerConfig) OvirtProvider
NewOvirtProvider creates new OvirtProvider configured with dependencies
func (*OvirtProvider) CleanUp ¶
func (o *OvirtProvider) CleanUp(failure bool, cr *v2vv1.VirtualMachineImport, client rclient.Client) error
CleanUp removes transient resources created for import
func (*OvirtProvider) Close ¶
func (o *OvirtProvider) Close()
Close the connection to ovirt provider
func (*OvirtProvider) CreateMapper ¶
func (o *OvirtProvider) CreateMapper() (provider.Mapper, error)
CreateMapper create the mapper for ovirt provider
func (*OvirtProvider) CreateVMSnapshot ¶ added in v0.3.0
func (o *OvirtProvider) CreateVMSnapshot() (string, error)
CreateVMSnapshot is not implemented.
func (*OvirtProvider) FindTemplate ¶
func (o *OvirtProvider) FindTemplate() (*templatev1.Template, error)
FindTemplate attempts to find best match for a template based on the source VM
func (*OvirtProvider) GetGuestConversionPod ¶ added in v0.3.1
func (o *OvirtProvider) GetGuestConversionPod() (*corev1.Pod, error)
GetGuestConversionJob is not implemented.
func (*OvirtProvider) GetVMName ¶ added in v0.0.3
func (o *OvirtProvider) GetVMName() (string, error)
GetVMName return oVirt virtual machine to be imported
func (*OvirtProvider) GetVMStatus ¶
func (o *OvirtProvider) GetVMStatus() (provider.VMStatus, error)
GetVMStatus provides source VM status
func (*OvirtProvider) GetVmiNamespacedName ¶ added in v0.0.2
func (o *OvirtProvider) GetVmiNamespacedName() types.NamespacedName
GetVmiNamespacedName return the namespaced name of the VM import object
func (*OvirtProvider) Init ¶
func (o *OvirtProvider) Init(secret *corev1.Secret, instance *v2vv1.VirtualMachineImport) error
Init ovirt provider using given secret
func (*OvirtProvider) LaunchGuestConversionPod ¶ added in v0.3.1
func (o *OvirtProvider) LaunchGuestConversionPod(_ *kubevirtv1.VirtualMachine, _ map[string]cdiv1.DataVolume) (*corev1.Pod, error)
LaunchGuestConversionJob is not implemented.
func (*OvirtProvider) LoadVM ¶
func (o *OvirtProvider) LoadVM(sourceSpec v2vv1.VirtualMachineImportSourceSpec) error
LoadVM fetch the source VM from ovirt and set it on the provider
func (*OvirtProvider) NeedsGuestConversion ¶ added in v0.2.2
func (o *OvirtProvider) NeedsGuestConversion() bool
NeedsGuestConversion indicates whether a VM from this provider must undergo guest conversion.
func (*OvirtProvider) PrepareResourceMapping ¶
func (o *OvirtProvider) PrepareResourceMapping(externalResourceMapping *v2vv1.ResourceMappingSpec, vmiSpec v2vv1.VirtualMachineImportSourceSpec)
PrepareResourceMapping merges external resource mapping and resource mapping provided in the virtual machine import spec
func (*OvirtProvider) ProcessTemplate ¶
func (o *OvirtProvider) ProcessTemplate(template *templatev1.Template, vmName *string, namespace string) (*kubevirtv1.VirtualMachine, error)
ProcessTemplate uses openshift api to process template
func (*OvirtProvider) StartVM ¶
func (o *OvirtProvider) StartVM() error
StartVM starts the source VM
func (*OvirtProvider) StopVM ¶
func (o *OvirtProvider) StopVM(instance *v2vv1.VirtualMachineImport, rclient rclient.Client) error
StopVM stop the source VM on ovirt
func (*OvirtProvider) SupportsWarmMigration ¶ added in v0.3.0
func (o *OvirtProvider) SupportsWarmMigration() bool
SupportsWarmMigration returns whether this provider supports warm migrations.
func (*OvirtProvider) TestConnection ¶ added in v0.0.4
func (o *OvirtProvider) TestConnection() error
TestConnection tests the connection to ovirt provider
func (*OvirtProvider) Validate ¶
func (o *OvirtProvider) Validate() ([]v2vv1.VirtualMachineImportCondition, error)
Validate validates whether loaded previously VM and resource mapping is valid. The validation results are recorded in th VMI CR identified by vmiCrName and in case of a validation failure error is returned.
func (*OvirtProvider) ValidateDiskStatus ¶ added in v0.0.4
func (o *OvirtProvider) ValidateDiskStatus(diskName string) (bool, error)
ValidateDiskStatus validate current status of the disk in oVirt env: