types

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	NetworkInternal = NetworkType("internal")
	NetworkExternal = NetworkType("external")
	NetworkBMC      = NetworkType("bmc")
)
View Source
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
	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 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 NetNSAppSpec

type NetNSAppSpec struct {
	Name    string   `json:"name"`
	Command []string `json:"command"`
}

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"`
	Memory       string           `json:"memory,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"`
}

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

Jump to

Keyboard shortcuts

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