vmconfig

package
v0.0.0-...-c8d08d2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RecipeCustomAMD64 = "custom-x86_64"
	RecipeCustomARM64 = "custom-arm64"
	RecipeDistroAMD64 = "distro-x86_64"
	RecipeDistroARM64 = "distro-arm64"
	RecipeCustomLocal = "custom-local"
	RecipeDistroLocal = "distro-local"
	RecipeDefault     = "default"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Workdir string  `json:"workdir"`
	VMSets  []VMSet `json:"vmsets"`
	SSHKey  string  `json:"sshkey,omitempty"`
	SSHUser string  `json:"ssh_user,omitempty"`
}

func LoadConfigFile

func LoadConfigFile(filename string) (*Config, error)

type Disk

type Disk struct {
	Type         PoolType `json:"type"`
	BackingStore string   `json:"source"`
	Target       string   `json:"target"`
	Size         string   `json:"size,omitempty"`
	Mountpoint   string   `json:"mount_point"`
}

type Host

type Host struct {
	AvailableCPUs int `json:"available_cpus"`
}

type Image

type Image struct {
	ImageName      string `json:"image_path,omitempty"`
	ImageSourceURI string `json:"image_source,omitempty"`
}

type Kernel

type Kernel struct {
	Dir         string            `json:"dir"`
	Tag         string            `json:"tag"`
	ImageSource string            `json:"image_source,omitempty"`
	ExtraParams map[string]string `json:"extra_params,omitempty"`
}

type PoolType

type PoolType string

type VMSet

type VMSet struct {
	Tags        []string `json:"tags"`
	Recipe      string   `json:"recipe"`
	Kernels     []Kernel `json:"kernels"`
	VCpu        []int    `json:"vcpu"`
	Memory      []int    `json:"memory"`
	Img         Image    `json:"image"`
	Machine     string   `json:"machine,omitempty"`
	Arch        string
	ID          VMSetID `json:"omitempty"`
	Disks       []Disk  `json:"disks,omitempty"`
	ConsoleType string  `json:"console_type"`
	VMHost      Host    `json:"host,omitempty"`
}

type VMSetID

type VMSetID string

func (VMSetID) String

func (id VMSetID) String() string

Jump to

Keyboard shortcuts

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