v1

package
v0.0.1-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppLabel      string = "kubevirt.io/app"
	DomainLabel   string = "kubevirt.io/domain"
	UIDLabel      string = "kubevirt.io/vmUID"
	NodeNameLabel string = "kubevirt.io/nodeName"
)
View Source
const GroupName = "kubevirt.io"

GroupName is the group name use in this package

Variables

View Source
var GroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion is group version used to register these objects

Functions

This section is empty.

Types

type Address

type Address struct {
	Type     string `xml:"type,attr" json:"type"`
	Domain   string `xml:"domain,attr" json:"domain"`
	Bus      string `xml:"bus,attr" json:"bus"`
	Slot     string `xml:"slot,attr" json:"slot"`
	Function string `xml:"function,attr" json:"function"`
}

func (Address) SwaggerDoc

func (Address) SwaggerDoc() map[string]string

type Alias

type Alias struct {
	Name string `xml:"name,attr" json:"name"`
}

func (Alias) SwaggerDoc

func (Alias) SwaggerDoc() map[string]string

type BIOS

type BIOS struct {
}

TODO <loader readonly='yes' secure='no' type='rom'>/usr/lib/xen/boot/hvmloader</loader>

func (BIOS) SwaggerDoc

func (BIOS) SwaggerDoc() map[string]string

type Ballooning

type Ballooning struct {
	Model string `xml:"model,attr" json:"model"`
}

func (Ballooning) SwaggerDoc

func (Ballooning) SwaggerDoc() map[string]string

type BandWidth

type BandWidth struct {
}

func (BandWidth) SwaggerDoc

func (BandWidth) SwaggerDoc() map[string]string

type Boot

type Boot struct {
	Dev string `xml:"dev,attr" json:"dev"`
}

func (Boot) SwaggerDoc

func (Boot) SwaggerDoc() map[string]string

type BootMenu

type BootMenu struct {
	Enabled bool  `xml:"enabled,attr" json:"enabled,omitempty"`
	Timeout *uint `xml:"timeout,attr,omitempty" json:"timeout,omitempty"`
}

func (BootMenu) SwaggerDoc

func (BootMenu) SwaggerDoc() map[string]string

type BootOrder

type BootOrder struct {
	Order uint `xml:"order,attr" json:"order"`
}

func (BootOrder) SwaggerDoc

func (BootOrder) SwaggerDoc() map[string]string

type Channel

type Channel struct {
	Type   string         `xml:"type,attr" json:"type"`
	Source ChannelSource  `xml:"source,omitempty" json:"source,omitempty"`
	Target *ChannelTarget `xml:"target,omitempty" json:"target,omitempty"`
}

func (Channel) SwaggerDoc

func (Channel) SwaggerDoc() map[string]string

type ChannelSource

type ChannelSource struct {
	Mode string `xml:"mode,attr" json:"mode"`
	Path string `xml:"path,attr" json:"path"`
}

func (ChannelSource) SwaggerDoc

func (ChannelSource) SwaggerDoc() map[string]string

type ChannelTarget

type ChannelTarget struct {
	Name    string `xml:"name,attr,omitempty" json:"name,omitempty"`
	Type    string `xml:"type,attr" json:"type"`
	Address string `xml:"address,attr,omitempty" json:"address,omitempty"`
	Port    uint   `xml:"port,attr,omitempty" json:"port,omitempty"`
}

func (ChannelTarget) SwaggerDoc

func (ChannelTarget) SwaggerDoc() map[string]string

type Clock

type Clock struct {
}

func (Clock) SwaggerDoc

func (Clock) SwaggerDoc() map[string]string

type Devices

type Devices struct {
	Emulator   string      `xml:"emulator" json:"emulator"`
	Interfaces []Interface `xml:"interface" json:"interfaces,omitempty"`
	Channels   []Channel   `xml:"channel" json:"channels,omitempty"`
	Video      []Video     `xml:"video" json:"video,omitempty"`
	Graphics   []Graphics  `xml:"graphics" json:"graphics,omitempty"`
	Ballooning *Ballooning `xml:"memballoon,omitempty" json:"memballoon,omitempty"`
	Disks      []Disk      `xml:"disk" json:"disks,omitempty"`
}

func (Devices) SwaggerDoc

func (Devices) SwaggerDoc() map[string]string

type Disk

type Disk struct {
	Device     string      `xml:"device,attr" json:"device"`
	Snapshot   string      `xml:"snapshot,attr" json:"shapshot"`
	Type       string      `xml:"type,attr" json:"type"`
	DiskSource DiskSource  `xml:"source" json:"diskSource"`
	DiskTarget DiskTarget  `xml:"target" json:"diskTarget"`
	Serial     string      `xml:"serial,omitempty" json:"serial,omitempty"`
	Driver     *DiskDriver `xml:"driver,omitempty" json:"driver,omitempty"`
	ReadOnly   *ReadOnly   `xml:"readonly,omitempty" json:"readOnly,omitempty"`
}

func (Disk) SwaggerDoc

func (Disk) SwaggerDoc() map[string]string

type DiskDriver

type DiskDriver struct {
	Cache       string `xml:"cache,attr,omitempty" json:"cache,omitempty"`
	ErrorPolicy string `xml:"error_policy,attr,omitempty" json:"errorPolicy,omitempty"`
	IO          string `xml:"io,attr,omitempty" json:"io,omitempty"`
	Name        string `xml:"name,attr" json:"name"`
	Type        string `xml:"type,attr" json:"type"`
}

func (DiskDriver) SwaggerDoc

func (DiskDriver) SwaggerDoc() map[string]string

type DiskSource

type DiskSource struct {
	File          string `xml:"file,attr" json:"file"`
	StartupPolicy string `xml:"startupPolicy,attr,omitempty" json:"startupPolicy,omitempty"`
}

func (DiskSource) SwaggerDoc

func (DiskSource) SwaggerDoc() map[string]string

type DiskTarget

type DiskTarget struct {
	Bus    string `xml:"bus,attr" json:"bus"`
	Device string `xml:"dev,attr" json:"dev"`
}

func (DiskTarget) SwaggerDoc

func (DiskTarget) SwaggerDoc() map[string]string

type DomainSpec

type DomainSpec struct {
	XMLName xml.Name `xml:"domain" json:"-"`
	Name    string   `xml:"name" json:"name"`
	UUID    string   `xml:"uuid,omitempty" json:"uuid,omitempty"`
	Memory  Memory   `xml:"memory" json:"memory"`
	Type    string   `xml:"type,attr" json:"type"`
	OS      OS       `xml:"os" json:"os"`
	SysInfo *SysInfo `xml:"sysinfo,omitempty" json:"sysInfo,omitempty"`
	Devices Devices  `xml:"devices" json:"devices"`
	Clock   *Clock   `xml:"clock,omitempty" json:"clock,omitempty"`
}

func NewMinimalDomainSpec

func NewMinimalDomainSpec(vmName string) *DomainSpec

func (DomainSpec) SwaggerDoc

func (DomainSpec) SwaggerDoc() map[string]string

type Entry

type Entry struct {
	Name  string `xml:"name" json:"name"`
	Value string `xml:",chardata" json:"value"`
}

func (Entry) SwaggerDoc

func (Entry) SwaggerDoc() map[string]string

type FilterRef

type FilterRef struct {
	Filter string `xml:"filter,attr" json:"filter"`
}

func (FilterRef) SwaggerDoc

func (FilterRef) SwaggerDoc() map[string]string

type Graphics

type Graphics struct {
	AutoPort      string `xml:"autoPort,attr,omitempty" json:"autoPort,omitempty"`
	DefaultMode   string `xml:"defaultMode,attr,omitempty" json:"defaultMode,omitempty"`
	Listen        Listen `xml:"listen,omitempty" json:"listen,omitempty"`
	PasswdValidTo string `xml:"passwdValidTo,attr,omitempty" json:"passwdValidTo,omitempty"`
	Port          int    `xml:"port,attr,omitempty" json:"port,omitempty"`
	TLSPort       int    `xml:"tlsPort,attr,omitempty" json:"tlsPort,omitempty"`
	Type          string `xml:"type,attr" json:"type"`
}

func (Graphics) SwaggerDoc

func (Graphics) SwaggerDoc() map[string]string

type Interface

type Interface struct {
	Address   *Address         `xml:"address,omitempty" json:"address,omitempty"`
	Type      string           `xml:"type,attr" json:"type"`
	Source    InterfaceSource  `xml:"source" json:"source"`
	Target    *InterfaceTarget `xml:"target,omitempty" json:"target,omitempty"`
	Model     *Model           `xml:"model,omitempty" json:"model,omitempty"`
	MAC       *MAC             `xml:"mac,omitempty" json:"mac,omitempty"`
	BandWidth *BandWidth       `xml:"bandwidth,omitempty" json:"bandwidth,omitempty"`
	BootOrder *BootOrder       `xml:"boot,omitempty" json:"boot,omitempty"`
	LinkState *LinkState       `xml:"link,omitempty" json:"link,omitempty"`
	FilterRef *FilterRef       `xml:"filterref,omitempty" json:"filterRef,omitempty"`
	Alias     *Alias           `xml:"alias,omitempty" json:"alias,omitempty"`
}

func (Interface) SwaggerDoc

func (Interface) SwaggerDoc() map[string]string

type InterfaceSource

type InterfaceSource struct {
	Network string `xml:"network,attr,omitempty" json:"network,omitempty"`
	Device  string `xml:"dev,attr,omitempty" json:"device,omitempty"`
	Bridge  string `xml:"bridge,attr,omitempty" json:"bridge,omitempty"`
}

func (InterfaceSource) SwaggerDoc

func (InterfaceSource) SwaggerDoc() map[string]string

type InterfaceTarget

type InterfaceTarget struct {
	Device string `xml:"dev,attr" json:"dev"`
}

func (InterfaceTarget) SwaggerDoc

func (InterfaceTarget) SwaggerDoc() map[string]string

type LinkState

type LinkState struct {
	State string `xml:"state,attr" json:"state"`
}

func (LinkState) SwaggerDoc

func (LinkState) SwaggerDoc() map[string]string

type Listen

type Listen struct {
	Type    string `xml:"type,attr" json:"type"`
	Address string `xml:"address,attr,omitempty" json:"address,omitempty"`
	Network string `xml:"newtork,attr,omitempty" json:"network,omitempty"`
}

func (Listen) SwaggerDoc

func (Listen) SwaggerDoc() map[string]string

type Loader

type Loader struct {
}

TODO <bios useserial='yes' rebootTimeout='0'/>

func (Loader) SwaggerDoc

func (Loader) SwaggerDoc() map[string]string

type MAC

type MAC struct {
	MAC string `xml:"address,attr" json:"address"`
}

func (MAC) SwaggerDoc

func (MAC) SwaggerDoc() map[string]string

type Memory

type Memory struct {
	Value uint   `xml:",chardata" json:"value"`
	Unit  string `xml:"unit,attr" json:"unit"`
}

func (Memory) SwaggerDoc

func (Memory) SwaggerDoc() map[string]string

type Model

type Model struct {
	Type string `xml:"type,attr" json:"type"`
}

func (Model) SwaggerDoc

func (Model) SwaggerDoc() map[string]string

type NVRam

type NVRam struct {
	NVRam    string `xml:",chardata,omitempty" json:"nvRam,omitempty"`
	Template string `xml:"template,attr,omitempty" json:"template,omitempty"`
}

func (NVRam) SwaggerDoc

func (NVRam) SwaggerDoc() map[string]string

type OS

type OS struct {
	Type      OSType    `xml:"type" json:"type"`
	SMBios    *SMBios   `xml:"smbios,omitempty" json:"smBIOS,omitempty"`
	BootOrder []Boot    `xml:"boot" json:"bootOrder"`
	BootMenu  *BootMenu `xml:"bootmenu,omitempty" json:"bootMenu,omitempty"`
	BIOS      *BIOS     `xml:"bios,omitempty" json:"bios,omitempty"`
}

func (OS) SwaggerDoc

func (OS) SwaggerDoc() map[string]string

type OSType

type OSType struct {
	OS      string `xml:",chardata" json:"os"`
	Arch    string `xml:"arch,attr,omitempty" json:"arch,omitempty"`
	Machine string `xml:"machine,attr,omitempty" json:"machine,omitempty"`
}

func (OSType) SwaggerDoc

func (OSType) SwaggerDoc() map[string]string

type RandomGenerator

type RandomGenerator struct {
}

func (RandomGenerator) SwaggerDoc

func (RandomGenerator) SwaggerDoc() map[string]string

type ReadOnly

type ReadOnly struct{}

func (ReadOnly) SwaggerDoc

func (ReadOnly) SwaggerDoc() map[string]string

type SMBios

type SMBios struct {
	Mode string `xml:"mode,attr" json:"mode"`
}

func (SMBios) SwaggerDoc

func (SMBios) SwaggerDoc() map[string]string

type SyncEvent

type SyncEvent string
const (
	Created    SyncEvent = "Created"
	Deleted    SyncEvent = "Deleted"
	Started    SyncEvent = "Started"
	Stopped    SyncEvent = "Stopped"
	SyncFailed SyncEvent = "SyncFailed"
	Resumed    SyncEvent = "Resumed"
)

func (SyncEvent) String

func (s SyncEvent) String() string

type SysInfo

type SysInfo struct {
	Type      string  `xml:"type,attr" json:"type"`
	System    []Entry `xml:"system>entry" json:"system"`
	BIOS      []Entry `xml:"bios>entry" json:"bios"`
	BaseBoard []Entry `xml:"baseBoard>entry" json:"baseBoard"`
}

func (SysInfo) SwaggerDoc

func (SysInfo) SwaggerDoc() map[string]string

type Timer

type Timer struct {
	Name       string `xml:"name,attr" json:"name"`
	TickPolicy string `xml:"tickpolicy,attr,omitempty" json:"tickPolicy,omitempty"`
	Present    string `xml:"present,attr,omitempty" json:"present,omitempty"`
}

func (Timer) SwaggerDoc

func (Timer) SwaggerDoc() map[string]string

type VM

type VM struct {
	unversioned.TypeMeta `json:",inline"`
	ObjectMeta           kubeapi.ObjectMeta `json:"metadata,omitempty"`
	Spec                 VMSpec             `json:"spec,omitempty" valid:"required"`
	Status               VMStatus           `json:"status"`
}

func NewMinimalVM

func NewMinimalVM(vmName string) *VM

func NewVM

func NewVM(name string, uid types.UID) *VM

func (*VM) GetObjectKind

func (v *VM) GetObjectKind() unversioned.ObjectKind

Required to satisfy Object interface

func (*VM) GetObjectMeta

func (v *VM) GetObjectMeta() meta.Object

Required to satisfy ObjectMetaAccessor interface

func (VM) SwaggerDoc

func (VM) SwaggerDoc() map[string]string

func (*VM) UnmarshalJSON

func (v *VM) UnmarshalJSON(data []byte) error

type VMCondition

type VMCondition struct {
	Type               VMConditionType    `json:"type"`
	Status             v1.ConditionStatus `json:"status"`
	LastProbeTime      unversioned.Time   `json:"lastProbeTime,omitempty"`
	LastTransitionTime unversioned.Time   `json:"lastTransitionTime,omitempty"`
	Reason             string             `json:"reason,omitempty"`
	Message            string             `json:"message,omitempty"`
}

func (VMCondition) SwaggerDoc

func (VMCondition) SwaggerDoc() map[string]string

type VMConditionType

type VMConditionType string
const (
	// PodCreated means that the VM request was translated into a Pod which can be scheduled and started by
	// Kubernetes.
	PodCreated VMConditionType = "PodCreated"
	// VMReady means the pod is able to service requests and should be added to the
	// load balancing pools of all matching services.
	VMReady VMConditionType = "Ready"
)

These are valid conditions of VMs.

type VMList

type VMList struct {
	unversioned.TypeMeta `json:",inline"`
	ListMeta             unversioned.ListMeta `json:"metadata,omitempty"`
	Items                []VM                 `json:"items"`
}

VMList is a list of VMs

func (*VMList) GetListMeta

func (vl *VMList) GetListMeta() unversioned.List

Required to satisfy ListMetaAccessor interface

func (*VMList) GetObjectKind

func (vl *VMList) GetObjectKind() unversioned.ObjectKind

Required to satisfy Object interface

func (VMList) SwaggerDoc

func (VMList) SwaggerDoc() map[string]string

func (*VMList) UnmarshalJSON

func (vl *VMList) UnmarshalJSON(data []byte) error

type VMPhase

type VMPhase string

VMPhase is a label for the condition of a VM at the current time.

const (
	// VMPending means the VM has been accepted by the system.
	// Either a target pod does not yet exist or a target Pod exists but is not yet scheduled and in running state.
	Scheduling VMPhase = "Scheduling"
	// A target pod was scheduled and the system saw that Pod in runnig state.
	// Here is where the responsibility of virt-controller ends and virt-handler takes over.
	Pending VMPhase = "Pending"
	// VMRunning means the pod has been bound to a node and the VM is started.
	Running VMPhase = "Running"
	// VMMigrating means the VM is currently migrated by a controller.
	Migrating VMPhase = "Migrating"
	// VMSucceeded means that the VM stopped voluntarily, e.g. reacted to SIGTERM or shutdown was invoked from
	// inside the VM.
	Succeeded VMPhase = "Succeeded"
	// VMFailed means that associated Pod is in failure state (exited with a non-zero exit code or was stopped by
	// the system).
	Failed VMPhase = "Failed"
	// VMUnknown means that for some reason the state of the VM could not be obtained, typically due
	// to an error in communicating with the host of the VM.
	Unknown VMPhase = "Unknown"
)

These are the valid statuses of pods.

type VMSpec

type VMSpec struct {
	Domain *DomainSpec `json:"domain,omitempty"`
	// If labels are specified, only nodes marked with all of these labels are considered when scheduling the VM.
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
}

VMSpec is a description of a VM

func (VMSpec) SwaggerDoc

func (VMSpec) SwaggerDoc() map[string]string

type VMStatus

type VMStatus struct {
	NodeName   string        `json:"nodeName,omitempty"`
	Conditions []VMCondition `json:"conditions,omitempty"`
	Phase      VMPhase       `json:"phase"`
}

VMStatus represents information about the status of a VM. Status may trail the actual state of a system.

func (VMStatus) SwaggerDoc

func (VMStatus) SwaggerDoc() map[string]string

type Video

type Video struct {
	Model VideoModel `xml:"model"`
}

func (Video) SwaggerDoc

func (Video) SwaggerDoc() map[string]string

type VideoModel

type VideoModel struct {
	Type   string `xml:"type,attr" json:"type"`
	Heads  uint   `xml:"heads,attr,omitempty" json:"heads,omitempty"`
	Ram    uint   `xml:"ram,attr,omitempty" json:"ram,omitempty"`
	VRam   uint   `xml:"vram,attr,omitempty" json:"vram,omitempty"`
	VGAMem uint   `xml:"vgamem,attr,omitempty" vgamem:"vram,omitempty"`
}

func (VideoModel) SwaggerDoc

func (VideoModel) SwaggerDoc() map[string]string

Jump to

Keyboard shortcuts

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