plan

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Phase   string   `json:"phase"`
	Reasons []string `json:"reasons"`
}

Error.

func (*Error) Add

func (e *Error) Add(reason ...string)

Add.

func (*Error) DeepCopy

func (in *Error) DeepCopy() *Error

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Error.

func (*Error) DeepCopyInto

func (in *Error) DeepCopyInto(out *Error)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HookRef

type HookRef struct {
	// Pipeline step.
	Step string `json:"step"`
	// Hook reference.
	Hook core.ObjectReference `json:"hook" ref:"Hook"`
}

Plan hook.

func (*HookRef) DeepCopy

func (in *HookRef) DeepCopy() *HookRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HookRef.

func (*HookRef) DeepCopyInto

func (in *HookRef) DeepCopyInto(out *HookRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HookRef) String

func (r *HookRef) String() string

type Map

type Map struct {
	// Network.
	Network core.ObjectReference `json:"network" ref:"NetworkMap"`
	// Storage.
	Storage core.ObjectReference `json:"storage" ref:"StorageMap"`
}

Maps.

func (*Map) DeepCopy

func (in *Map) DeepCopy() *Map

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Map.

func (*Map) DeepCopyInto

func (in *Map) DeepCopyInto(out *Map)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MigrationStatus

type MigrationStatus struct {
	Timed `json:",inline,omitempty"`
	// History
	History []Snapshot `json:"history,omitempty"`
	// VM status
	VMs []*VMStatus `json:"vms,omitempty"`
}

Migration status.

func (*MigrationStatus) ActiveSnapshot

func (r *MigrationStatus) ActiveSnapshot() *Snapshot

The active snapshot. This is the last snapshot in the history.

func (*MigrationStatus) DeepCopy

func (in *MigrationStatus) DeepCopy() *MigrationStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigrationStatus.

func (*MigrationStatus) DeepCopyInto

func (in *MigrationStatus) DeepCopyInto(out *MigrationStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MigrationStatus) FindVM

func (r *MigrationStatus) FindVM(ref ref.Ref) (v *VMStatus, found bool)

Find a VM status.

func (*MigrationStatus) NewSnapshot

func (r *MigrationStatus) NewSnapshot(snapshot Snapshot)

Add new snapshot.

func (*MigrationStatus) SnapshotWithMigration

func (r *MigrationStatus) SnapshotWithMigration(uid types.UID) (found bool, snapshot *Snapshot)

Find snapshot for migration by UID.

type Precopy

type Precopy struct {
	Start    *meta.Time `json:"start,omitempty"`
	End      *meta.Time `json:"end,omitempty"`
	Snapshot string     `json:"snapshot,omitempty"`
}

Precopy durations

func (*Precopy) DeepCopy

func (in *Precopy) DeepCopy() *Precopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Precopy.

func (*Precopy) DeepCopyInto

func (in *Precopy) DeepCopyInto(out *Precopy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Snapshot

type Snapshot struct {
	// Conditions.
	libcnd.Conditions `json:",inline"`
	// Provider
	Provider SnapshotRefPair `json:"provider"`
	// Plan
	Plan SnapshotRef `json:"plan"`
	// Map.
	Map SnapshotMap `json:"map"`
	// Migration
	Migration SnapshotRef `json:"migration"`
}

Snapshot

func (*Snapshot) DeepCopy

func (in *Snapshot) DeepCopy() *Snapshot

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Snapshot.

func (*Snapshot) DeepCopyInto

func (in *Snapshot) DeepCopyInto(out *Snapshot)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SnapshotMap

type SnapshotMap struct {
	Network SnapshotRef `json:"network"`
	Storage SnapshotRef `json:"storage"`
}

Mapping.

func (*SnapshotMap) DeepCopy

func (in *SnapshotMap) DeepCopy() *SnapshotMap

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotMap.

func (*SnapshotMap) DeepCopyInto

func (in *SnapshotMap) DeepCopyInto(out *SnapshotMap)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SnapshotRef

type SnapshotRef struct {
	Namespace  string    `json:"namespace"`
	Name       string    `json:"name"`
	UID        types.UID `json:"uid"`
	Generation int64     `json:"generation"`
}

Snapshot object reference.

func (*SnapshotRef) DeepCopy

func (in *SnapshotRef) DeepCopy() *SnapshotRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotRef.

func (*SnapshotRef) DeepCopyInto

func (in *SnapshotRef) DeepCopyInto(out *SnapshotRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SnapshotRef) Match

func (r *SnapshotRef) Match(object meta.Object) bool

Match the object and ref by UID/Generation.

func (*SnapshotRef) With

func (r *SnapshotRef) With(object meta.Object)

Populate the ref using the specified (meta) object.

type SnapshotRefPair

type SnapshotRefPair struct {
	Source      SnapshotRef `json:"source"`
	Destination SnapshotRef `json:"destination"`
}

Source and destination pair.

func (*SnapshotRefPair) DeepCopy

func (in *SnapshotRefPair) DeepCopy() *SnapshotRefPair

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotRefPair.

func (*SnapshotRefPair) DeepCopyInto

func (in *SnapshotRefPair) DeepCopyInto(out *SnapshotRefPair)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Step

type Step struct {
	Task `json:",inline"`
	// Nested tasks.
	Tasks []*Task `json:"tasks,omitempty"`
}

Pipeline step.

func (*Step) DeepCopy

func (in *Step) DeepCopy() *Step

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Step.

func (*Step) DeepCopyInto

func (in *Step) DeepCopyInto(out *Step)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Step) FindTask

func (r *Step) FindTask(name string) (task *Task, found bool)

Find task by name.

func (*Step) ReflectTasks

func (r *Step) ReflectTasks()

Reflect task progress and errors.

type Task

type Task struct {
	Timed `json:",inline"`
	// Name.
	Name string `json:"name"`
	// Name
	Description string `json:"description,omitempty"`
	// Phase
	Phase string `json:"phase,omitempty"`
	// Reason
	Reason string `json:"reason,omitempty"`
	// Progress.
	Progress libitr.Progress `json:"progress"`
	// Annotations.
	Annotations map[string]string `json:"annotations,omitempty"`
	// Error.
	Error *Error `json:"error,omitempty"`
}

Migration task.

func (*Task) AddError

func (r *Task) AddError(reason ...string)

Add an error.

func (*Task) DeepCopy

func (in *Task) DeepCopy() *Task

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task.

func (*Task) DeepCopyInto

func (in *Task) DeepCopyInto(out *Task)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Task) HasError

func (r *Task) HasError() bool

Return whether the task has an error.

type Timed

type Timed struct {
	// Started timestamp.
	Started *meta.Time `json:"started,omitempty"`
	// Completed timestamp.
	Completed *meta.Time `json:"completed,omitempty"`
}

Resources that record started and completed timestamps.

func (*Timed) DeepCopy

func (in *Timed) DeepCopy() *Timed

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Timed.

func (*Timed) DeepCopyInto

func (in *Timed) DeepCopyInto(out *Timed)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Timed) MarkCompleted

func (r *Timed) MarkCompleted()

Mark as completed.

func (*Timed) MarkReset

func (r *Timed) MarkReset()

Reset.

func (*Timed) MarkStarted

func (r *Timed) MarkStarted()

Mark as started.

func (*Timed) MarkedCompleted

func (r *Timed) MarkedCompleted() bool

Has completed.

func (*Timed) MarkedStarted

func (r *Timed) MarkedStarted() bool

Has started.

func (*Timed) Running

func (r *Timed) Running() bool

Is migrating.

type VM

type VM struct {
	ref.Ref `json:",inline"`
	// Enable hooks.
	Hooks []HookRef `json:"hooks,omitempty"`
}

A VM listed on the plan.

func (*VM) DeepCopy

func (in *VM) DeepCopy() *VM

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VM.

func (*VM) DeepCopyInto

func (in *VM) DeepCopyInto(out *VM)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VM) FindHook

func (r *VM) FindHook(step string) (ref HookRef, found bool)

Find a Hook for the specified step.

type VMStatus

type VMStatus struct {
	Timed `json:",inline"`
	VM    `json:",inline"`
	// Migration pipeline.
	Pipeline []*Step `json:"pipeline"`
	// Phase
	Phase string `json:"phase"`
	// Errors
	Error *Error `json:"error,omitempty"`
	// Warm migration status
	Warm *Warm `json:"warm,omitempty"`
	// Source VM power state before migration.
	RestorePowerState string `json:"restorePowerState,omitempty"`

	// Conditions.
	libcnd.Conditions `json:",inline"`
}

VM Status

func (*VMStatus) AddError

func (r *VMStatus) AddError(reason ...string)

Add an error.

func (*VMStatus) DeepCopy

func (in *VMStatus) DeepCopy() *VMStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMStatus.

func (*VMStatus) DeepCopyInto

func (in *VMStatus) DeepCopyInto(out *VMStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VMStatus) FindStep

func (r *VMStatus) FindStep(name string) (step *Step, found bool)

Find a step by name.

func (*VMStatus) ReflectPipeline

func (r *VMStatus) ReflectPipeline()

Reflect pipeline.

type Warm

type Warm struct {
	Successes           int        `json:"successes"`
	Failures            int        `json:"failures"`
	ConsecutiveFailures int        `json:"consecutiveFailures"`
	NextPrecopyAt       *meta.Time `json:"nextPrecopyAt,omitempty"`
	Precopies           []Precopy  `json:"precopies,omitempty"`
}

Warm Migration status

func (*Warm) DeepCopy

func (in *Warm) DeepCopy() *Warm

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Warm.

func (*Warm) DeepCopyInto

func (in *Warm) DeepCopyInto(out *Warm)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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