mapper

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataVolumeCredentials

type DataVolumeCredentials struct {
	URL        string
	Username   string
	Password   string
	Thumbprint string
	SecretName string
}

DataVolumeCredentials defines the credentials required for creating a DataVolume with a VDDK source.

type Disk added in v0.3.4

type Disk struct {
	BackingFileName string
	Capacity        int64
	DatastoreMoRef  string
	DatastoreName   string
	ID              string
	Name            string
	Key             int32
}

Disk is an abstraction of a VMWare VirtualDisk

func BuildDisks added in v0.3.4

func BuildDisks(vmProperties *mo.VirtualMachine) []Disk

BuildDisks retrieves each of the VM's VirtualDisks and pulls out the values that are needed for import

type Nic added in v0.3.4

type Nic struct {
	Name        string
	Network     string
	Mac         string
	DVPortGroup string
}

Nic is an abstraction of a VMWare VirtualEthernetCard

func BuildNics added in v0.3.4

func BuildNics(vmProperties *mo.VirtualMachine) []Nic

BuildNics retrieves each of the VM's VirtualEthernetCards and pulls out the values that are needed for import

type VmwareMapper

type VmwareMapper struct {
	// contains filtered or unexported fields
}

VmwareMapper is a struct that holds attributes needed to map a vSphere VM to Kubevirt

func NewVmwareMapper

func NewVmwareMapper(vm *object.VirtualMachine, vmProperties *mo.VirtualMachine, hostProperties *mo.HostSystem, credentials *DataVolumeCredentials, mappings *v1beta1.VmwareMappings, instanceUID string, namespace string, osFinder vos.OSFinder) *VmwareMapper

NewVmwareMapper creates a new VmwareMapper struct

func (*VmwareMapper) CreateEmptyVM

func (r *VmwareMapper) CreateEmptyVM(vmName *string) *kubevirtv1.VirtualMachine

CreateEmptyVM creates an empty Kubevirt VM

func (*VmwareMapper) MapDataVolumes

func (r *VmwareMapper) MapDataVolumes(_ *string, filesystemOverhead cdiv1.FilesystemOverhead) (map[string]cdiv1.DataVolume, error)

MapDataVolumes maps the VMware disks to CDI DataVolumes

func (*VmwareMapper) MapDisk

func (r *VmwareMapper) MapDisk(vmSpec *kubevirtv1.VirtualMachine, dv cdiv1.DataVolume)

MapDisk maps a disk from the VMware VM to the Kubevirt VM.

func (*VmwareMapper) MapVM

func (r *VmwareMapper) MapVM(targetVmName *string, vmSpec *kubevirtv1.VirtualMachine) (*kubevirtv1.VirtualMachine, error)

MapVM maps resources from a VMware VM to a Kubevirt VM

func (*VmwareMapper) ResolveVMName

func (r *VmwareMapper) ResolveVMName(targetVMName *string) *string

ResolveVMName resolves the target VM name

func (*VmwareMapper) RunningState added in v0.3.4

func (r *VmwareMapper) RunningState() bool

RunningState determines whether the created Kubevirt vmSpec should have a running state of true or false.

Jump to

Keyboard shortcuts

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