Documentation
¶
Index ¶
- Constants
- Variables
- func AcquireTemplateLock(name, message string) (*fslock.Lock, error)
- func DefaultNetworkConfig() *container.NetworkConfig
- func EnsureCloneTemplate(backingFilesystem string, series string, network *container.NetworkConfig, ...) (golxc.Container, error)
- func NewContainerInitialiser(series string) container.Initialiser
- func NewContainerManager(conf container.ManagerConfig) (container.Manager, error)
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 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.
Click to show internal directories.
Click to hide internal directories.