Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 // Copyright 2013 Canonical Ltd. | 1 // Copyright 2013 Canonical Ltd. |
2 // Licensed under the AGPLv3, see LICENCE file for details. | 2 // Licensed under the AGPLv3, see LICENCE file for details. |
3 | 3 |
4 package container | 4 package container |
5 | 5 |
6 import ( | 6 import ( |
7 "launchpad.net/juju-core/environs/cloudinit" | 7 "launchpad.net/juju-core/environs/cloudinit" |
8 "launchpad.net/juju-core/instance" | 8 "launchpad.net/juju-core/instance" |
9 ) | 9 ) |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... | |
21 // containers that it has started. | 21 // containers that it has started. |
22 type Manager interface { | 22 type Manager interface { |
23 // CreateContainer creates and starts a new container for the specified | 23 // CreateContainer creates and starts a new container for the specified |
24 // machine. | 24 // machine. |
25 CreateContainer( | 25 CreateContainer( |
26 machineConfig *cloudinit.MachineConfig, | 26 machineConfig *cloudinit.MachineConfig, |
27 series string, | 27 series string, |
28 network *NetworkConfig) (instance.Instance, *instance.HardwareCh aracteristics, error) | 28 network *NetworkConfig) (instance.Instance, *instance.HardwareCh aracteristics, error) |
29 | 29 |
30 // DestroyContainer stops and destroyes the container identified by | 30 // DestroyContainer stops and destroyes the container identified by |
31 » // Instance. | 31 » // instance id. |
wallyworld
2014/05/14 02:37:16
comment tweak - "by instance id"
axw
2014/05/14 03:05:04
Done.
| |
32 DestroyContainer(instance.Id) error | 32 DestroyContainer(instance.Id) error |
33 | 33 |
34 // ListContainers return a list of containers that have been started by | 34 // ListContainers return a list of containers that have been started by |
35 // this manager. | 35 // this manager. |
36 ListContainers() ([]instance.Instance, error) | 36 ListContainers() ([]instance.Instance, error) |
37 } | 37 } |
38 | 38 |
39 // Initialiser is responsible for performing the steps required to initialise | 39 // Initialiser is responsible for performing the steps required to initialise |
40 // a host machine so it can run containers. | 40 // a host machine so it can run containers. |
41 type Initialiser interface { | 41 type Initialiser interface { |
(...skipping 10 matching lines...) Expand all Loading... | |
52 delete(m, key) | 52 delete(m, key) |
53 return value | 53 return value |
54 } | 54 } |
55 | 55 |
56 // WarnAboutUnused emits a warning about each value in the map. | 56 // WarnAboutUnused emits a warning about each value in the map. |
57 func (m ManagerConfig) WarnAboutUnused() { | 57 func (m ManagerConfig) WarnAboutUnused() { |
58 for key, value := range m { | 58 for key, value := range m { |
59 logger.Warningf("unused config option: %q -> %q", key, value) | 59 logger.Warningf("unused config option: %q -> %q", key, value) |
60 } | 60 } |
61 } | 61 } |
LEFT | RIGHT |