Documentation ¶
Index ¶
- Constants
- Variables
- type DataVolumeCredentials
- type OvirtMapper
- func (o *OvirtMapper) CreateEmptyVM(vmName *string) *kubevirtv1.VirtualMachine
- func (o *OvirtMapper) MapDataVolumes(targetVMName *string, filesystemOverhead cdiv1.FilesystemOverhead) (map[string]cdiv1.DataVolume, error)
- func (o *OvirtMapper) MapDisk(vmSpec *kubevirtv1.VirtualMachine, dv cdiv1.DataVolume)
- func (o *OvirtMapper) MapVM(targetVMName *string, vmSpec *kubevirtv1.VirtualMachine) (*kubevirtv1.VirtualMachine, error)
- func (o *OvirtMapper) ResolveVMName(targetVMName *string) *string
- func (o *OvirtMapper) RunningState() bool
Constants ¶
const ( // LabelOrigin define name of the label which holds value of origin attribute of oVirt VM LabelOrigin = "origin" // LabelInstanceType define name of the label which holds value of instance type attribute of oVirt VM LabelInstanceType = "instanceType" // LabelTag define name of the label which holds tags of oVirt VM LabelTag = "tags" // AnnotationComment define name of the annotation which holds comment of oVirt VM AnnotationComment = "comment" // AnnotationSso define name of the annotation which holds sso method of oVirt VM AnnotationSso = "sso" // DefaultStorageClassTargetName define the storage target name value that forces using default storage class DefaultStorageClassTargetName = "" )
Variables ¶
var BiosTypeMapping = map[string]*kubevirtv1.Bootloader{ "q35_sea_bios": {BIOS: &kubevirtv1.BIOS{}}, "q35_secure_boot": {BIOS: &kubevirtv1.BIOS{}}, "q35_ovmf": {EFI: &kubevirtv1.EFI{}}, "i440fx_sea_bios": {BIOS: &kubevirtv1.BIOS{}}, }
BiosTypeMapping defines mapping of BIOS types between oVirt and kubevirt domains
var ( // DefaultVolumeMode is default volume mode passed to PVC of datavolume we map. DefaultVolumeMode = corev1.PersistentVolumeFilesystem )
var DiskInterfaceModelMapping = map[string]string{"sata": "sata", "virtio_scsi": "scsi", "virtio": "virtio"}
DiskInterfaceModelMapping defines mapping of disk interface models between oVirt and kubevirt domains
Functions ¶
This section is empty.
Types ¶
type DataVolumeCredentials ¶
type DataVolumeCredentials struct { URL string CACertificate string KeyAccess string KeySecret string ConfigMapName string SecretName string }
DataVolumeCredentials defines the credentials required for creating a data volume
type OvirtMapper ¶
type OvirtMapper struct {
// contains filtered or unexported fields
}
OvirtMapper is struct that holds attributes needed to map oVirt VM to kubevirt VM
func NewOvirtMapper ¶
func NewOvirtMapper(vm *ovirtsdk.Vm, mappings *v2vv1.OvirtMappings, creds DataVolumeCredentials, namespace string, osFinder oos.OSFinder) *OvirtMapper
NewOvirtMapper create ovirt mapper object
func (*OvirtMapper) CreateEmptyVM ¶
func (o *OvirtMapper) CreateEmptyVM(vmName *string) *kubevirtv1.VirtualMachine
CreateEmptyVM creates empty virtual machine definition
func (*OvirtMapper) MapDataVolumes ¶
func (o *OvirtMapper) MapDataVolumes(targetVMName *string, filesystemOverhead cdiv1.FilesystemOverhead) (map[string]cdiv1.DataVolume, error)
MapDataVolumes map the oVirt VM disks to the map of CDI DataVolumes specification, where map key is the target-vm-name + id of the oVirt disk
func (*OvirtMapper) MapDisk ¶ added in v0.0.4
func (o *OvirtMapper) MapDisk(vmSpec *kubevirtv1.VirtualMachine, dv cdiv1.DataVolume)
MapDisk map VM disk
func (*OvirtMapper) MapVM ¶
func (o *OvirtMapper) MapVM(targetVMName *string, vmSpec *kubevirtv1.VirtualMachine) (*kubevirtv1.VirtualMachine, error)
MapVM map oVirt API VM definition to kubevirt VM definition
func (*OvirtMapper) ResolveVMName ¶
func (o *OvirtMapper) ResolveVMName(targetVMName *string) *string
ResolveVMName resolves the target VM name
func (*OvirtMapper) RunningState ¶ added in v0.3.4
func (o *OvirtMapper) RunningState() bool
RunningState determines whether the created Kubevirt vmSpec should have a running state of true or false.