lxc

package
v0.0.0-...-f19ae85 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2015 License: AGPL-3.0 Imports: 33 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  = golxc.GetDefaultLXCContainerDir()
	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) (*container.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,
	networkConfig *container.NetworkConfig,
	authorizedKeys string,
	aptProxy proxy.Settings,
	aptMirror string,
	enablePackageUpdates bool,
	enableOSUpgrades bool,
	imageURLGetter container.ImageURLGetter,
) (golxc.Container, error)

Make sure a template exists that we can clone from.

func IsLXCSupported

func IsLXCSupported() (bool, error)

IsLXCSupported returns a boolean value indicating whether or not we can run LXC containers

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, imageURLGetter container.ImageURLGetter) (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 inside the given ManagerConfig.

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