Documentation ¶
Index ¶
- type VmwareProvider
- func (r *VmwareProvider) CleanUp(failure bool, cr *v1beta1.VirtualMachineImport, client client.Client) error
- func (r *VmwareProvider) Close()
- func (r *VmwareProvider) CreateMapper() (provider.Mapper, error)
- func (r *VmwareProvider) CreateVMSnapshot() (string, error)
- func (r *VmwareProvider) FindTemplate() (*oapiv1.Template, error)
- func (r *VmwareProvider) GetGuestConversionPod() (*corev1.Pod, error)
- func (r *VmwareProvider) GetVMName() (string, error)
- func (r *VmwareProvider) GetVMStatus() (provider.VMStatus, error)
- func (r *VmwareProvider) Init(secret *corev1.Secret, instance *v1beta1.VirtualMachineImport) error
- func (r *VmwareProvider) LaunchGuestConversionPod(vmSpec *v1.VirtualMachine, dataVolumes map[string]cdiv1.DataVolume) (*corev1.Pod, error)
- func (r *VmwareProvider) LoadVM(sourceSpec v1beta1.VirtualMachineImportSourceSpec) error
- func (r *VmwareProvider) NeedsGuestConversion() bool
- func (r *VmwareProvider) PrepareResourceMapping(externalResourceMapping *v1beta1.ResourceMappingSpec, ...)
- func (r *VmwareProvider) ProcessTemplate(template *oapiv1.Template, vmName *string, namespace string) (*v1.VirtualMachine, error)
- func (r *VmwareProvider) RemoveVMSnapshot(snapshotID string, removeChildren bool) error
- func (r *VmwareProvider) StartVM() error
- func (r *VmwareProvider) StopVM(instance *v1beta1.VirtualMachineImport, client client.Client) error
- func (r *VmwareProvider) SupportsWarmMigration() bool
- func (r *VmwareProvider) TestConnection() error
- func (r *VmwareProvider) Validate() ([]v1beta1.VirtualMachineImportCondition, error)
- func (r *VmwareProvider) ValidateDiskStatus(_ string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VmwareProvider ¶
type VmwareProvider struct {
// contains filtered or unexported fields
}
VmwareProvider is VMware implementation of the Provider interface to support importing VMs from VMware
func NewVmwareProvider ¶
func NewVmwareProvider(vmiObjectMeta metav1.ObjectMeta, vmiTypeMeta metav1.TypeMeta, client client.Client, tempClient *tempclient.TemplateV1Client, factory pclient.Factory, ctrlConfig ctrlConfig.ControllerConfig) VmwareProvider
NewVmwareProvider creates a new VmwareProvider
func (*VmwareProvider) CleanUp ¶
func (r *VmwareProvider) CleanUp(failure bool, cr *v1beta1.VirtualMachineImport, client client.Client) error
CleanUp removes transient resources created for import
func (*VmwareProvider) Close ¶
func (r *VmwareProvider) Close()
Close logs out the client and shuts down idle connections.
func (*VmwareProvider) CreateMapper ¶
func (r *VmwareProvider) CreateMapper() (provider.Mapper, error)
CreateMapper creates a VM mapper for this provider.
func (*VmwareProvider) CreateVMSnapshot ¶ added in v0.3.0
func (r *VmwareProvider) CreateVMSnapshot() (string, error)
CreateVMSnapshot creates a snapshot to use in a warm migration.
func (*VmwareProvider) FindTemplate ¶
func (r *VmwareProvider) FindTemplate() (*oapiv1.Template, error)
FindTemplate attempts to find best match for a template based on the source VM
func (*VmwareProvider) GetGuestConversionPod ¶ added in v0.3.1
func (r *VmwareProvider) GetGuestConversionPod() (*corev1.Pod, error)
func (*VmwareProvider) GetVMName ¶
func (r *VmwareProvider) GetVMName() (string, error)
GetVMName gets the name of the source VM
func (*VmwareProvider) GetVMStatus ¶
func (r *VmwareProvider) GetVMStatus() (provider.VMStatus, error)
GetVMStatus gets the power status of the source VM
func (*VmwareProvider) Init ¶
func (r *VmwareProvider) Init(secret *corev1.Secret, instance *v1beta1.VirtualMachineImport) error
Init initializes the VmwareProvider with a given credential secret and VirtualMachineImport
func (*VmwareProvider) LaunchGuestConversionPod ¶ added in v0.3.1
func (r *VmwareProvider) LaunchGuestConversionPod(vmSpec *v1.VirtualMachine, dataVolumes map[string]cdiv1.DataVolume) (*corev1.Pod, error)
func (*VmwareProvider) LoadVM ¶
func (r *VmwareProvider) LoadVM(sourceSpec v1beta1.VirtualMachineImportSourceSpec) error
LoadVM fetches the source VM.
func (*VmwareProvider) NeedsGuestConversion ¶
func (r *VmwareProvider) NeedsGuestConversion() bool
func (*VmwareProvider) PrepareResourceMapping ¶
func (r *VmwareProvider) PrepareResourceMapping(externalResourceMapping *v1beta1.ResourceMappingSpec, vmiSpec v1beta1.VirtualMachineImportSourceSpec)
PrepareResourceMapping merges the external resource mapping with the mapping provided in the VirtualMachineImport spec
func (*VmwareProvider) ProcessTemplate ¶
func (r *VmwareProvider) ProcessTemplate(template *oapiv1.Template, vmName *string, namespace string) (*v1.VirtualMachine, error)
ProcessTemplate uses the Openshift API to process a template
func (*VmwareProvider) RemoveVMSnapshot ¶ added in v0.3.5
func (r *VmwareProvider) RemoveVMSnapshot(snapshotID string, removeChildren bool) error
func (*VmwareProvider) StartVM ¶
func (r *VmwareProvider) StartVM() error
StartVM powers on the source VM.
func (*VmwareProvider) StopVM ¶
func (r *VmwareProvider) StopVM(instance *v1beta1.VirtualMachineImport, client client.Client) error
StopVM powers off the source VM.
func (*VmwareProvider) SupportsWarmMigration ¶ added in v0.3.0
func (r *VmwareProvider) SupportsWarmMigration() bool
func (*VmwareProvider) TestConnection ¶
func (r *VmwareProvider) TestConnection() error
TestConnection tests the connection to the vCenter or ESXi host.
func (*VmwareProvider) Validate ¶
func (r *VmwareProvider) Validate() ([]v1beta1.VirtualMachineImportCondition, error)
Validate checks whether the source VM and resource mapping is valid.
func (*VmwareProvider) ValidateDiskStatus ¶
func (r *VmwareProvider) ValidateDiskStatus(_ string) (bool, error)
ValidateDiskStatus is a no-op which is present in order to satisfy the Provider interface.