bootstrap

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBootstrapCommand

func NewBootstrapCommand() *cobra.Command

func ParseProxmoxBasicArchetypeParams

func ParseProxmoxBasicArchetypeParams(data interface{}) (*proxmoxBasicArchetypeParams, error)

Types

type Config

type Config interface {
	Bootstrap() error
}

func ParseConfig

func ParseConfig(path string) (Config, error)

type Image

type Image struct {
	Name    string `yaml:"name"`
	Flavor  string `yaml:"flavor"`
	Auto    bool   `yaml:"auto"`
	UsbBoot bool   `yaml:"usb-boot"`
	Reuse   bool   `yaml:"reuse"`
	Format  string `yaml:"format"`
}

func ParseImages

func ParseImages(data map[string]interface{}) ([]*Image, error)

type Payload

type Payload struct {
	ExtraArgs
	YamlPath string
}

type Provider

type Provider interface {
	Name() string
	CreateVM(vm *VM, images []*Image) error
}

Interface for all providers

func ParseProviders

func ParseProviders(data map[string]interface{}) ([]Provider, error)

Entry point to parse a list of providers. Input data expects a top level key whose name is the value of 'keyInfra'

type VM

type VM struct {
	Id       string `yaml:"id"`
	Name     string `yaml:"name"`
	Provider struct {
		Name string                 `yaml:"name"`
		Args map[string]interface{} `yaml:"args"`
	} `yaml:"provider"`
	Image struct {
		Name  string `yaml:"name"`
		Store string `yaml:"store"`
	} `yaml:"image"`
	Archetype string      `yaml:"archetype"`
	Params    interface{} `yaml:"-"`
	Start     bool        `yaml:"start"`
}

func ParseVMs

func ParseVMs(data map[string]interface{}) ([]*VM, error)

main entry point to create VM structures from YAML file

Jump to

Keyboard shortcuts

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