vmware

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

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

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

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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