Documentation ¶
Index ¶
Constants ¶
const ( NetworkInternal = NetworkType("internal") NetworkExternal = NetworkType("external") NetworkBMC = NetworkType("bmc") )
const ( NodeVolumeCacheWriteback = NodeVolumeCache("writeback") NodeVolumeCacheNone = NodeVolumeCache("none") NodeVolumeCacheWritethrough = NodeVolumeCache("writethrough") NodeVolumeCacheDirectSync = NodeVolumeCache("directsync") NodeVolumeCacheUnsafe = NodeVolumeCache("unsafe") NodeVolumeKindImage = NodeVolumeKind("image") NodeVolumeKindLocalds = NodeVolumeKind("localds") NodeVolumeKindRaw = NodeVolumeKind("raw") NodeVolumeKindHostPath = NodeVolumeKind("hostPath") NodeVolumeFormatQcow2 = NodeVolumeFormat("qcow2") NodeVolumeFormatRaw = NodeVolumeFormat("raw") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterSpec ¶
type ClusterSpec struct { Networks []*NetworkSpec NetNSs []*NetNSSpec DeviceClasses []*DeviceClassSpec Nodes []*NodeSpec Images []*ImageSpec }
ClusterSpec represents a set of resources for a virtual data center.
func Parse ¶
func Parse(r io.Reader) (*ClusterSpec, error)
Parse reads a yaml document and create ClusterSpec
func (*ClusterSpec) Append ¶
func (c *ClusterSpec) Append(other *ClusterSpec) *ClusterSpec
Append appends another cluster into the receiver.
type DeviceClassSpec ¶ added in v2.1.0
type DeviceClassSpec struct { Kind string `json:"kind"` Name string `json:"name"` Path string `json:"path"` }
DeviceClassSpec represents a DeviceClass specification in YAML
type ImageSpec ¶
type ImageSpec struct { Kind string `json:"kind"` Name string `json:"name"` URL string `json:"url,omitempty"` File string `json:"file,omitempty"` CompressionMethod string `json:"compression,omitempty"` }
ImageSpec represents an Image specification in YAML.
type NUMASpec ¶ added in v2.3.0
type NUMASpec struct { // Nodes represents the number of NUMA nodes. Used in case of simple symmetric NUMA configuration. Nodes int `json:"nodes,omitempty"` }
type NetNSAppSpec ¶
NetNSAppSpec represents a NetworkNamespace's App definition in YAML
type NetNSInterfaceSpec ¶
type NetNSInterfaceSpec struct { Network string `json:"network"` Addresses []string `json:"addresses,omitempty"` }
NetNSInterfaceSpec represents a NetworkNamespace's Interface definition in YAML
type NetNSSpec ¶
type NetNSSpec struct { Kind string `json:"kind"` Name string `json:"name"` Interfaces []*NetNSInterfaceSpec `json:"interfaces"` Apps []*NetNSAppSpec `json:"apps,omitempty"` InitScripts []string `json:"init-scripts,omitempty"` }
NetNSSpec represents a NetworkNamespace specification in YAML
type NetworkSpec ¶
type NetworkSpec struct { Kind string `json:"kind"` Name string `json:"name"` Type NetworkType `json:"type"` UseNAT bool `json:"use-nat"` Address string `json:"address,omitempty"` }
NetworkSpec represents a Network specification in YAML
type NetworkType ¶
type NetworkType string
type NodeSpec ¶
type NodeSpec struct { Kind string `json:"kind"` Name string `json:"name"` Interfaces []string `json:"interfaces,omitempty"` Volumes []NodeVolumeSpec `json:"volumes,omitempty"` IgnitionFile string `json:"ignition,omitempty"` CPU int `json:"cpu,omitempty"` // compatibility use SMP *SMPSpec `json:"smp,omitempty"` Memory string `json:"memory,omitempty"` NUMA NUMASpec `json:"numa,omitempty"` NetworkDeviceQueue int `json:"network-device-queue,omitempty"` UEFI bool `json:"uefi,omitempty"` TPM bool `json:"tpm,omitempty"` SMBIOS SMBIOSConfigSpec `json:"smbios,omitempty"` }
NodeSpec represents a Node specification in YAML
type NodeVolumeCache ¶
type NodeVolumeCache string
type NodeVolumeFormat ¶
type NodeVolumeFormat string
type NodeVolumeKind ¶
type NodeVolumeKind string
type NodeVolumeSpec ¶
type NodeVolumeSpec struct { Kind NodeVolumeKind `json:"kind"` Name string `json:"name"` Image string `json:"image,omitempty"` UserData string `json:"user-data,omitempty"` NetworkConfig string `json:"network-config,omitempty"` Size string `json:"size,omitempty"` Path string `json:"path,omitempty"` CopyOnWrite bool `json:"copy-on-write,omitempty"` Cache NodeVolumeCache `json:"cache,omitempty"` Format NodeVolumeFormat `json:"format,omitempty"` VG string `json:"vg,omitempty"` Writable bool `json:"writable,omitempty"` DeviceClass string `json:"device-class,omitempty"` }
NodeVolumeSpec represents a Node's Volume specification in YAML
type SMBIOSConfigSpec ¶
type SMBIOSConfigSpec struct { Manufacturer string `json:"manufacturer,omitempty"` Product string `json:"product,omitempty"` Serial string `json:"serial,omitempty"` }
SMBIOSConfigSpec represents a Node's SMBIOS definition in YAML
type SMPSpec ¶ added in v2.2.0
type SMPSpec struct { CPUs int `json:"cpus,omitempty"` Cores int `json:"cores,omitempty"` Threads int `json:"threads,omitempty"` Dies int `json:"dies,omitempty"` Sockets int `json:"sockets,omitempty"` MaxCPUs int `json:"maxcpus,omitempty"` }
SMPSpec represents a SMP (CPU) specification in YAML