1
// Copyright 2013 Canonical Ltd.
2
// Licensed under the AGPLv3, see LICENCE file for details.
4
// This package exists solely to avoid circular imports.
9
"github.com/juju/errors"
11
"github.com/juju/juju/container"
12
"github.com/juju/juju/container/kvm"
13
"github.com/juju/juju/container/lxd"
14
"github.com/juju/juju/instance"
17
// NewContainerManager creates the appropriate container.Manager for the
18
// specified container type.
19
func NewContainerManager(forType instance.ContainerType, conf container.ManagerConfig) (container.Manager, error) {
22
return lxd.NewContainerManager(conf)
24
return kvm.NewContainerManager(conf)
26
return nil, errors.Errorf("unknown container type: %q", forType)