ovirtprovider

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigMapsManager

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 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 config.KubeVirtConfigProvider) OvirtProvider

NewOvirtProvider creates new OvirtProvider configured with dependencies

func (*OvirtProvider) CleanUp

func (o *OvirtProvider) CleanUp() 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) 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

func (*OvirtProvider) Init

func (o *OvirtProvider) Init(secret *corev1.Secret, instance *v2vv1alpha1.VirtualMachineImport) error

Init ovirt provider using given secret

func (*OvirtProvider) LoadVM

LoadVM fetch the source VM from ovirt and set it on the provider

func (*OvirtProvider) PrepareResourceMapping

func (o *OvirtProvider) PrepareResourceMapping(externalResourceMapping *v2vv1alpha1.ResourceMappingSpec, vmiSpec v2vv1alpha1.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() error

StopVM stop the source VM on ovirt

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.

type SecretsManager

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 SourceClientFactory

type SourceClientFactory struct{}

SourceClientFactory provides default client factory implementation

func NewSourceClientFactory

func NewSourceClientFactory() *SourceClientFactory

NewSourceClientFactory creates new factory

func (*SourceClientFactory) NewOvirtClient

func (f *SourceClientFactory) NewOvirtClient(dataMap map[string]string) (pclient.VMClient, error)

NewOvirtClient creates new Ovirt clients

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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