lxc

package
v0.0.0-...-732aecd Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2014 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultLxcBridge is the package created container bridge
	DefaultLxcBridge = "lxcbr0"
	// Btrfs is special as we treat it differently for create and clone.
	Btrfs = "btrfs"
)

Variables

View Source
var (
	TemplateLockDir = "/var/lib/juju/locks"

	TemplateStopTimeout = 5 * time.Minute
)
View Source
var (
	LxcContainerDir  = "/var/lib/lxc"
	LxcRestartDir    = "/etc/lxc/auto"
	LxcObjectFactory = golxc.Factory()
)
View Source
var FsCommandOutput = (*exec.Cmd).CombinedOutput

FsCommandOutput calls cmd.Output, this is used as an overloading point so we can test what *would* be run without actually executing another program

Functions

func AcquireTemplateLock

func AcquireTemplateLock(name, message string) (*fslock.Lock, error)

func DefaultNetworkConfig

func DefaultNetworkConfig() *container.NetworkConfig

DefaultNetworkConfig returns a valid NetworkConfig to use the defaultLxcBridge that is created by the lxc package.

func EnsureCloneTemplate

func EnsureCloneTemplate(
	backingFilesystem string,
	series string,
	network *container.NetworkConfig,
	authorizedKeys string,
	aptProxy proxy.Settings,
) (golxc.Container, error)

Make sure a template exists that we can clone from.

func NewContainerInitialiser

func NewContainerInitialiser(series string) container.Initialiser

NewContainerInitialiser returns an instance used to perform the steps required to allow a host machine to run a LXC container.

func NewContainerManager

func NewContainerManager(conf container.ManagerConfig) (container.Manager, error)

NewContainerManager returns a manager object that can start and stop lxc containers. The containers that are created are namespaced by the name parameter.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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