ovirt

package
v0.0.0-...-e73b65a Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterDefault = "cluster_default"
	Q35Ovmf        = "q35_ovmf"
)

BIOS types

View Source
const (
	VirtioScsi = "virtio_scsi"
	Virtio     = "virtio"
	Sata       = "sata"
	Scsi       = "scsi"
	IDE        = "ide"
)

Bus types

View Source
const (
	Pod    = "pod"
	Multus = "multus"
)

Network types

View Source
const (
	TemplateOSLabel       = "os.template.kubevirt.io/%s"
	TemplateWorkloadLabel = "workload.template.kubevirt.io/server"
	TemplateFlavorLabel   = "flavor.template.kubevirt.io/medium"
)

Template labels

View Source
const (
	DefaultWindows = "win10"
	DefaultLinux   = "rhel8.1"
	Unknown        = "unknown"
)

Operating Systems

View Source
const (
	Tablet = "tablet"
)

Input types

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct{}

oVirt adapter.

func (*Adapter) Builder

func (r *Adapter) Builder(ctx *plancontext.Context) (builder base.Builder, err error)

Constructs a oVirt builder.

func (*Adapter) Client

func (r *Adapter) Client(ctx *plancontext.Context) (client base.Client, err error)

Constructs an oVirt client.

func (*Adapter) Validator

func (r *Adapter) Validator(plan *api.Plan) (validator base.Validator, err error)

Constructs a oVirt validator.

type Builder

type Builder struct {
	*plancontext.Context
	// contains filtered or unexported fields
}

oVirt builder.

func (*Builder) ConfigMap

func (r *Builder) ConfigMap(_ ref.Ref, in *core.Secret, object *core.ConfigMap) (err error)

Create DataVolume certificate configmap.

func (*Builder) DataVolumes

func (r *Builder) DataVolumes(vmRef ref.Ref, secret *core.Secret, configMap *core.ConfigMap) (dvs []cdi.DataVolumeSpec, err error)

Create DataVolume specs for the VM.

func (*Builder) ResolveDataVolumeIdentifier

func (r *Builder) ResolveDataVolumeIdentifier(dv *cdi.DataVolume) string

Return a stable identifier for a DataVolume.

func (*Builder) Secret

func (r *Builder) Secret(_ ref.Ref, in, object *core.Secret) (err error)

Build the DataVolume credential secret.

func (*Builder) Tasks

func (r *Builder) Tasks(vmRef ref.Ref) (list []*plan.Task, err error)

Build tasks.

func (*Builder) TemplateLabels

func (r *Builder) TemplateLabels(vmRef ref.Ref) (labels map[string]string, err error)

func (*Builder) VirtualMachine

func (r *Builder) VirtualMachine(vmRef ref.Ref, object *cnv.VirtualMachineSpec, dataVolumes []cdi.DataVolume) (err error)

Create the destination Kubevirt VM.

type Client

type Client struct {
	*plancontext.Context
	// contains filtered or unexported fields
}

oVirt VM Client

func (*Client) CheckSnapshotReady

func (r *Client) CheckSnapshotReady(vmRef ref.Ref, snapshot string) (ready bool, err error)

Check if a snapshot is ready to transfer, to avoid importer restarts.

func (*Client) Close

func (r *Client) Close()

Close the connection to the oVirt API.

func (*Client) CreateSnapshot

func (r *Client) CreateSnapshot(vmRef ref.Ref) (snapshot string, err error)

Create a VM snapshot and return its ID.

func (*Client) PowerOff

func (r *Client) PowerOff(vmRef ref.Ref) (err error)

Power off the VM.

func (*Client) PowerOn

func (r *Client) PowerOn(vmRef ref.Ref) (err error)

Power on the VM.

func (*Client) PowerState

func (r *Client) PowerState(vmRef ref.Ref) (state string, err error)

Get the power state of the VM.

func (*Client) PoweredOff

func (r *Client) PoweredOff(vmRef ref.Ref) (poweredOff bool, err error)

Determine whether the VM has been powered off.

func (*Client) RemoveSnapshots

func (r *Client) RemoveSnapshots(vmRef ref.Ref, precopies []planapi.Precopy) (err error)

Remove all warm migration snapshots.

func (*Client) SetCheckpoints

func (r *Client) SetCheckpoints(vmRef ref.Ref, precopies []planapi.Precopy, datavolumes []cdi.DataVolume, final bool) (err error)

Set DataVolume checkpoints.

type Validator

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

vSphere validator.

func (*Validator) Load

func (r *Validator) Load() (err error)

Load.

func (*Validator) MaintenanceMode

func (r *Validator) MaintenanceMode(_ ref.Ref) (ok bool, err error)

Validate that a VM's Host isn't in maintenance mode. No-op for oVirt.

func (*Validator) NetworksMapped

func (r *Validator) NetworksMapped(vmRef ref.Ref) (ok bool, err error)

Validate that a VM's networks have been mapped.

func (*Validator) PodNetwork

func (r *Validator) PodNetwork(vmRef ref.Ref) (ok bool, err error)

Validate that no more than one of a VM's networks is mapped to the pod network.

func (*Validator) StorageMapped

func (r *Validator) StorageMapped(vmRef ref.Ref) (ok bool, err error)

Validate that a VM's disk backing storage has been mapped.

func (*Validator) WarmMigration

func (r *Validator) WarmMigration() (ok bool)

Validate whether warm migration is supported from this provider type.

Jump to

Keyboard shortcuts

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