Documentation ¶
Index ¶
- type ConfigMapsManager
- type OvirtProvider
- func (o *OvirtProvider) CleanUp() error
- func (o *OvirtProvider) Close()
- func (o *OvirtProvider) CreateMapper() (provider.Mapper, error)
- func (o *OvirtProvider) FindTemplate() (*templatev1.Template, error)
- func (o *OvirtProvider) GetVMStatus() (provider.VMStatus, error)
- func (o *OvirtProvider) GetVmiNamespacedName() types.NamespacedName
- func (o *OvirtProvider) Init(secret *corev1.Secret, instance *v2vv1alpha1.VirtualMachineImport) error
- func (o *OvirtProvider) LoadVM(sourceSpec v2vv1alpha1.VirtualMachineImportSourceSpec) error
- func (o *OvirtProvider) PrepareResourceMapping(externalResourceMapping *v2vv1alpha1.ResourceMappingSpec, ...)
- func (o *OvirtProvider) ProcessTemplate(template *templatev1.Template, vmName *string, namespace string) (*kubevirtv1.VirtualMachine, error)
- func (o *OvirtProvider) StartVM() error
- func (o *OvirtProvider) StopVM() error
- func (o *OvirtProvider) Validate() ([]v2vv1alpha1.VirtualMachineImportCondition, error)
- type SecretsManager
- type SourceClientFactory
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 ¶
func (o *OvirtProvider) LoadVM(sourceSpec v2vv1alpha1.VirtualMachineImportSourceSpec) error
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 ¶
func (o *OvirtProvider) Validate() ([]v2vv1alpha1.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.
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 ¶
NewOvirtClient creates new Ovirt clients