cfglxclib

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROFILE_BACKUP_DIR = "/tmp"
	PROFILE_IMAGE_NANE = "base"
	CONTAINER_LOG_DIR  = "/var/log/beluganos"
)

Variables

This section is empty.

Functions

func AddInterface

func AddInterface(client *lxdlib.Client, name string, prefix string, ifname string, hwaddr string, mtu uint16) error

func ClearBackup

func ClearBackup(path string) error

func CreateContainer

func CreateContainer(client *lxdlib.Client, name string, keep bool, logdir, mngIf, bridgeIf string) error

func DeleteContainer

func DeleteContainer(client *lxdlib.Client, name string)

func DeleteInterface

func DeleteInterface(client *lxdlib.Client, name string, ifname string) error

func LoadProfile

func LoadProfile(client *lxdlib.Client, name, path string) error

func MakeLogDir added in v0.3.0

func MakeLogDir(name string) string

func ParseInterfaceArgs

func ParseInterfaceArgs(args []string) map[string]string

func RmLogDir added in v0.3.0

func RmLogDir(name string)

func SaveProfile

func SaveProfile(client *lxdlib.Client, name, path string) error

func SetInterface

func SetInterface(client *lxdlib.Client, name string, ifname string, negate bool, args ...string) error

func StrOperations

func StrOperations() string

func Usage

func Usage(code int)

Types

type Args

type Args struct {
	Oper      Operation
	Name      string
	IFNames   []string
	BackupDir string
	IFPrefix  string
	Image     string
	Verbose   bool
}

func (*Args) Backup

func (a *Args) Backup() string

func (*Args) Parse

func (a *Args) Parse()

type Operation

type Operation int
const (
	OP_HELP Operation = iota
	OP_SAVE
	OP_LOAD
	OP_CLEAR
	OP_ADD
	OP_DEL
	OP_ADD_IFACE
	OP_DEL_IFACE
)

func ParseOperation

func ParseOperation(s string) (Operation, error)

func (Operation) String

func (o Operation) String() string

Jump to

Keyboard shortcuts

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