commands

package
v0.0.0-...-05992ad Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2016 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UUID_FILE_NAME = ".uuid"
	MAC_FILE_NAME  = ".mac"
)
View Source
const (
	CONFIG_FILE_NAME   = "config.yml"
	BOX_FILE_EXTENSION = ".xhv"
)
View Source
const (
	BOX_ROOT_DIR = "$HOME/.xhyvectl/boxes/"
)
View Source
const (
	COMMAND = "xhyvectl"
)
View Source
const (
	VM_ROOT_DIR = "$HOME/.xhyvectl/vms/"
)

Variables

View Source
var (
	VERSION string
	GITSHA1 string
)

Functions

func ErrorExit

func ErrorExit(ctx *cobra.Command, message string)

func Execute

func Execute()

func Initialize

func Initialize()

func SetupProgressBar

func SetupProgressBar(size int, prefix string) *pb.ProgressBar

func Sudo

func Sudo(ctx *cobra.Command)

Types

type BootConfig

type BootConfig struct {
	Kernel      string `yaml:"kernel,omitempty"`
	Initrd      string `yaml:"initrd,omitempty"`
	CommandLine string `yaml:"cmdline,omitempty"`

	UserBoot   string `yaml:"userboot,omitempty"`
	BootVolume string `yaml:"uservolume,omitempty"`
	KernelENV  string `yaml:"kernelenv,omitempty"`
}

type Config

type Config struct {
	Type       string     `yaml:"type"`
	BootConfig BootConfig `yaml:"boot"`
	SSHConfig  SSHConfig  `yaml:"ssh"`
	VMConfig   VMConfig   `yaml:"vm,omitempty"`
}

func LoadConfig

func LoadConfig(path string) (*Config, error)

type SSHConfig

type SSHConfig struct {
	UserName string `yaml:"username"`
	Password string `yaml:"password,omitempty"`
	KeyPath  string `yaml:"key-path,omitempty"`
}

type VMConfig

type VMConfig struct {
	ACPI   bool     `yaml:"acpi,omitempty"`
	CPUs   int      `yaml:"cpus,omitempty"`
	Memory string   `yaml:"memory,omitempty"`
	HDD    []string `yaml:"hdd,omitempty"`
	Net    []string `yaml:"net,omitempty"`
	PCI    []string `yaml:"pci,omitempty"`
	LPC    []string `yaml:"lpc,omitempty"`
}

Jump to

Keyboard shortcuts

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