vsphere

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: 36 Imported by: 0

Documentation

Index

Constants

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 (
	Efi = "efi"
)

BIOS types

View Source
const (
	Tablet = "tablet"
)

Input types

View Source
const (
	Virtio = "virtio"
)

Bus types

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct{}

vSphere adapter.

func (*Adapter) Builder

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

Constructs a vSphere builder.

func (*Adapter) Client

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

Constructs a vSphere client.

func (*Adapter) Validator

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

Constructs a vSphere validator.

type Builder

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

vSphere builder.

func (*Builder) ConfigMap

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

Create DataVolume certificate configmap. No-op for vSphere.

func (*Builder) DataVolumes

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

Create DataVolume specs for the VM.

func (*Builder) Load

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

Load

func (*Builder) ResolveDataVolumeIdentifier

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

Return a stable identifier for a VDDK DataVolume.

func (*Builder) Secret

func (r *Builder) Secret(vmRef 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
}

vSphere 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.

func (*Client) Close

func (r *Client) Close()

Close the connection to the vSphere API.

func (*Client) CreateSnapshot

func (r *Client) CreateSnapshot(vmRef ref.Ref) (id 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. Requires guest tools to be installed.

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 EsxHost

type EsxHost struct {
	// Host url.
	URL string
	// Host secret.
	Secret *core.Secret
	// contains filtered or unexported fields
}

ESX Host.

func (*EsxHost) DatastoreID

func (r *EsxHost) DatastoreID(ds *model.Datastore) (id string, err error)

Translate datastore ID.

func (*EsxHost) TestConnection

func (r *EsxHost) TestConnection() (err error)

Test the connection.

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(vmRef ref.Ref) (ok bool, err error)

Validate that a VM's Host isn't in maintenance mode.

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