ovirtprovider

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

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) FindTemplate

func (o *OvirtProvider) FindTemplate() (*templatev1.Template, error)

FindTemplate attempts to find best match for a template based on the source VM

func (*OvirtProvider) GetGuestConversionJob added in v0.2.2

func (o *OvirtProvider) GetGuestConversionJob() (*batchv1.Job, error)

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) LaunchGuestConversionJob added in v0.2.2

func (o *OvirtProvider) LaunchGuestConversionJob(_ *kubevirtv1.VirtualMachine) (*batchv1.Job, error)

func (*OvirtProvider) LoadVM

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

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) TestConnection added in v0.0.4

func (o *OvirtProvider) TestConnection() error

TestConnection tests the connection to ovirt provider

func (*OvirtProvider) Validate

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:

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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