Browse code

Rename `Daemon.Get` to `Daemon.GetContainer`.

This is more aligned with `Daemon.GetImage` and less confusing.

Signed-off-by: David Calavera <david.calavera@gmail.com>

David Calavera authored on 2015/12/12 02:39:28
Showing 30 changed files
... ...
@@ -22,7 +22,7 @@ var ErrExtractPointNotDirectory = errors.New("extraction point is not a director
22 22
 // ContainerCopy performs a deprecated operation of archiving the resource at
23 23
 // the specified path in the conatiner identified by the given name.
24 24
 func (daemon *Daemon) ContainerCopy(name string, res string) (io.ReadCloser, error) {
25
-	container, err := daemon.Get(name)
25
+	container, err := daemon.GetContainer(name)
26 26
 	if err != nil {
27 27
 		return nil, err
28 28
 	}
... ...
@@ -37,7 +37,7 @@ func (daemon *Daemon) ContainerCopy(name string, res string) (io.ReadCloser, err
37 37
 // ContainerStatPath stats the filesystem resource at the specified path in the
38 38
 // container identified by the given name.
39 39
 func (daemon *Daemon) ContainerStatPath(name string, path string) (stat *types.ContainerPathStat, err error) {
40
-	container, err := daemon.Get(name)
40
+	container, err := daemon.GetContainer(name)
41 41
 	if err != nil {
42 42
 		return nil, err
43 43
 	}
... ...
@@ -49,7 +49,7 @@ func (daemon *Daemon) ContainerStatPath(name string, path string) (stat *types.C
49 49
 // specified path in the container identified by the given name. Returns a
50 50
 // tar archive of the resource and whether it was a directory or a single file.
51 51
 func (daemon *Daemon) ContainerArchivePath(name string, path string) (content io.ReadCloser, stat *types.ContainerPathStat, err error) {
52
-	container, err := daemon.Get(name)
52
+	container, err := daemon.GetContainer(name)
53 53
 	if err != nil {
54 54
 		return nil, nil, err
55 55
 	}
... ...
@@ -64,7 +64,7 @@ func (daemon *Daemon) ContainerArchivePath(name string, path string) (content io
64 64
 // be an error if unpacking the given content would cause an existing directory
65 65
 // to be replaced with a non-directory and vice versa.
66 66
 func (daemon *Daemon) ContainerExtractToDir(name, path string, noOverwriteDirNonDir bool, content io.Reader) error {
67
-	container, err := daemon.Get(name)
67
+	container, err := daemon.GetContainer(name)
68 68
 	if err != nil {
69 69
 		return err
70 70
 	}
... ...
@@ -20,7 +20,7 @@ type ContainerAttachWithLogsConfig struct {
20 20
 
21 21
 // ContainerAttachWithLogs attaches to logs according to the config passed in. See ContainerAttachWithLogsConfig.
22 22
 func (daemon *Daemon) ContainerAttachWithLogs(prefixOrName string, c *ContainerAttachWithLogsConfig) error {
23
-	container, err := daemon.Get(prefixOrName)
23
+	container, err := daemon.GetContainer(prefixOrName)
24 24
 	if err != nil {
25 25
 		return err
26 26
 	}
... ...
@@ -60,7 +60,7 @@ type ContainerWsAttachWithLogsConfig struct {
60 60
 
61 61
 // ContainerWsAttachWithLogs websocket connection
62 62
 func (daemon *Daemon) ContainerWsAttachWithLogs(prefixOrName string, c *ContainerWsAttachWithLogsConfig) error {
63
-	container, err := daemon.Get(prefixOrName)
63
+	container, err := daemon.GetContainer(prefixOrName)
64 64
 	if err != nil {
65 65
 		return err
66 66
 	}
... ...
@@ -4,7 +4,7 @@ import "github.com/docker/docker/pkg/archive"
4 4
 
5 5
 // ContainerChanges returns a list of container fs changes
6 6
 func (daemon *Daemon) ContainerChanges(name string) ([]archive.Change, error) {
7
-	container, err := daemon.Get(name)
7
+	container, err := daemon.GetContainer(name)
8 8
 	if err != nil {
9 9
 		return nil, err
10 10
 	}
... ...
@@ -21,7 +21,7 @@ import (
21 21
 // Commit creates a new filesystem image from the current state of a container.
22 22
 // The image can optionally be tagged into a repository.
23 23
 func (daemon *Daemon) Commit(name string, c *types.ContainerCommitConfig) (string, error) {
24
-	container, err := daemon.Get(name)
24
+	container, err := daemon.GetContainer(name)
25 25
 	if err != nil {
26 26
 		return "", err
27 27
 	}
... ...
@@ -417,7 +417,7 @@ func (daemon *Daemon) buildSandboxOptions(container *container.Container, n libn
417 417
 			continue
418 418
 		}
419 419
 
420
-		c, err := daemon.Get(ref.ParentID)
420
+		c, err := daemon.GetContainer(ref.ParentID)
421 421
 		if err != nil {
422 422
 			logrus.Error(err)
423 423
 		}
... ...
@@ -785,7 +785,7 @@ func (daemon *Daemon) setNetworkNamespaceKey(containerID string, pid int) error
785 785
 
786 786
 func (daemon *Daemon) getIpcContainer(container *container.Container) (*container.Container, error) {
787 787
 	containerID := container.HostConfig.IpcMode.Container()
788
-	c, err := daemon.Get(containerID)
788
+	c, err := daemon.GetContainer(containerID)
789 789
 	if err != nil {
790 790
 		return nil, err
791 791
 	}
... ...
@@ -796,7 +796,7 @@ func (daemon *Daemon) getIpcContainer(container *container.Container) (*containe
796 796
 }
797 797
 
798 798
 func (daemon *Daemon) getNetworkedContainer(containerID, connectedContainerID string) (*container.Container, error) {
799
-	nc, err := daemon.Get(connectedContainerID)
799
+	nc, err := daemon.GetContainer(connectedContainerID)
800 800
 	if err != nil {
801 801
 		return nil, err
802 802
 	}
... ...
@@ -119,7 +119,7 @@ func (daemon *Daemon) generateSecurityOpt(ipcMode runconfig.IpcMode, pidMode run
119 119
 		return label.DisableSecOpt(), nil
120 120
 	}
121 121
 	if ipcContainer := ipcMode.Container(); ipcContainer != "" {
122
-		c, err := daemon.Get(ipcContainer)
122
+		c, err := daemon.GetContainer(ipcContainer)
123 123
 		if err != nil {
124 124
 			return nil, err
125 125
 		}
... ...
@@ -163,14 +163,14 @@ type Daemon struct {
163 163
 	imageStore                image.Store
164 164
 }
165 165
 
166
-// Get looks for a container using the provided information, which could be
166
+// GetContainer looks for a container using the provided information, which could be
167 167
 // one of the following inputs from the caller:
168 168
 //  - A full container ID, which will exact match a container in daemon's list
169 169
 //  - A container name, which will only exact match via the GetByName() function
170 170
 //  - A partial container ID prefix (e.g. short ID) of any length that is
171 171
 //    unique enough to only return a single container object
172 172
 //  If none of these searches succeed, an error is returned
173
-func (daemon *Daemon) Get(prefixOrName string) (*container.Container, error) {
173
+func (daemon *Daemon) GetContainer(prefixOrName string) (*container.Container, error) {
174 174
 	if containerByID := daemon.containers.Get(prefixOrName); containerByID != nil {
175 175
 		// prefix is an exact match to a full container ID
176 176
 		return containerByID, nil
... ...
@@ -196,13 +196,13 @@ func (daemon *Daemon) Get(prefixOrName string) (*container.Container, error) {
196 196
 // Exists returns a true if a container of the specified ID or name exists,
197 197
 // false otherwise.
198 198
 func (daemon *Daemon) Exists(id string) bool {
199
-	c, _ := daemon.Get(id)
199
+	c, _ := daemon.GetContainer(id)
200 200
 	return c != nil
201 201
 }
202 202
 
203 203
 // IsPaused returns a bool indicating if the specified container is paused.
204 204
 func (daemon *Daemon) IsPaused(id string) bool {
205
-	c, _ := daemon.Get(id)
205
+	c, _ := daemon.GetContainer(id)
206 206
 	return c.State.IsPaused()
207 207
 }
208 208
 
... ...
@@ -552,7 +552,7 @@ func (daemon *Daemon) getEventFilter(filter filters.Args) *events.Filter {
552 552
 	// incoming container filter can be name, id or partial id, convert to
553 553
 	// a full container id
554 554
 	for _, cn := range filter.Get("container") {
555
-		c, err := daemon.Get(cn)
555
+		c, err := daemon.GetContainer(cn)
556 556
 		filter.Del("container", cn)
557 557
 		if err == nil {
558 558
 			filter.Add("container", c.ID)
... ...
@@ -599,7 +599,7 @@ func (daemon *Daemon) children(name string) (map[string]*container.Container, er
599 599
 	children := make(map[string]*container.Container)
600 600
 
601 601
 	err = daemon.containerGraphDB.Walk(name, func(p string, e *graphdb.Entity) error {
602
-		c, err := daemon.Get(e.ID())
602
+		c, err := daemon.GetContainer(e.ID())
603 603
 		if err != nil {
604 604
 			return err
605 605
 		}
... ...
@@ -21,7 +21,7 @@ import (
21 21
 // https://github.com/docker/docker/issues/8069
22 22
 //
23 23
 
24
-func TestGet(t *testing.T) {
24
+func TestGetContainer(t *testing.T) {
25 25
 	c1 := &container.Container{
26 26
 		CommonContainer: container.CommonContainer{
27 27
 			ID:   "5a4ff6a163ad4533d22d69a2b8960bf7fafdcba06e72d2febdba229008b0bf57",
... ...
@@ -91,32 +91,32 @@ func TestGet(t *testing.T) {
91 91
 		containerGraphDB: graph,
92 92
 	}
93 93
 
94
-	if container, _ := daemon.Get("3cdbd1aa394fd68559fd1441d6eff2ab7c1e6363582c82febfaa8045df3bd8de"); container != c2 {
94
+	if container, _ := daemon.GetContainer("3cdbd1aa394fd68559fd1441d6eff2ab7c1e6363582c82febfaa8045df3bd8de"); container != c2 {
95 95
 		t.Fatal("Should explicitly match full container IDs")
96 96
 	}
97 97
 
98
-	if container, _ := daemon.Get("75fb0b8009"); container != c4 {
98
+	if container, _ := daemon.GetContainer("75fb0b8009"); container != c4 {
99 99
 		t.Fatal("Should match a partial ID")
100 100
 	}
101 101
 
102
-	if container, _ := daemon.Get("drunk_hawking"); container != c2 {
102
+	if container, _ := daemon.GetContainer("drunk_hawking"); container != c2 {
103 103
 		t.Fatal("Should match a full name")
104 104
 	}
105 105
 
106 106
 	// c3.Name is a partial match for both c3.ID and c2.ID
107
-	if c, _ := daemon.Get("3cdbd1aa"); c != c3 {
107
+	if c, _ := daemon.GetContainer("3cdbd1aa"); c != c3 {
108 108
 		t.Fatal("Should match a full name even though it collides with another container's ID")
109 109
 	}
110 110
 
111
-	if container, _ := daemon.Get("d22d69a2b896"); container != c5 {
111
+	if container, _ := daemon.GetContainer("d22d69a2b896"); container != c5 {
112 112
 		t.Fatal("Should match a container where the provided prefix is an exact match to the it's name, and is also a prefix for it's ID")
113 113
 	}
114 114
 
115
-	if _, err := daemon.Get("3cdbd1"); err == nil {
115
+	if _, err := daemon.GetContainer("3cdbd1"); err == nil {
116 116
 		t.Fatal("Should return an error when provided a prefix that partially matches multiple container ID's")
117 117
 	}
118 118
 
119
-	if _, err := daemon.Get("nothing"); err == nil {
119
+	if _, err := daemon.GetContainer("nothing"); err == nil {
120 120
 		t.Fatal("Should return an error when provided a prefix that is neither a name or a partial match to an ID")
121 121
 	}
122 122
 
... ...
@@ -632,14 +632,14 @@ func (daemon *Daemon) registerLinks(container *container.Container, hostConfig *
632 632
 		if err != nil {
633 633
 			return err
634 634
 		}
635
-		child, err := daemon.Get(name)
635
+		child, err := daemon.GetContainer(name)
636 636
 		if err != nil {
637
-			//An error from daemon.Get() means this name could not be found
637
+			//An error from daemon.GetContainer() means this name could not be found
638 638
 			return fmt.Errorf("Could not get container for %s", name)
639 639
 		}
640 640
 		for child.HostConfig.NetworkMode.IsContainer() {
641 641
 			parts := strings.SplitN(string(child.HostConfig.NetworkMode), ":", 2)
642
-			child, err = daemon.Get(parts[1])
642
+			child, err = daemon.GetContainer(parts[1])
643 643
 			if err != nil {
644 644
 				return fmt.Errorf("Could not get container for %s", parts[1])
645 645
 			}
... ...
@@ -82,7 +82,7 @@ func (d Docker) Pull(name string) (*image.Image, error) {
82 82
 
83 83
 // Container looks up a Docker container referenced by `id`.
84 84
 func (d Docker) Container(id string) (*container.Container, error) {
85
-	return d.Daemon.Get(id)
85
+	return d.Daemon.GetContainer(id)
86 86
 }
87 87
 
88 88
 // Create creates a new Docker container and returns potential warnings
... ...
@@ -96,7 +96,7 @@ func (d Docker) Create(cfg *runconfig.Config, hostCfg *runconfig.HostConfig) (*c
96 96
 	if err != nil {
97 97
 		return nil, nil, err
98 98
 	}
99
-	container, err := d.Daemon.Get(ccr.ID)
99
+	container, err := d.Container(ccr.ID)
100 100
 	if err != nil {
101 101
 		return nil, ccr.Warnings, err
102 102
 	}
... ...
@@ -17,7 +17,7 @@ import (
17 17
 // fails. If the remove succeeds, the container name is released, and
18 18
 // network links are removed.
19 19
 func (daemon *Daemon) ContainerRm(name string, config *types.ContainerRmConfig) error {
20
-	container, err := daemon.Get(name)
20
+	container, err := daemon.GetContainer(name)
21 21
 	if err != nil {
22 22
 		return err
23 23
 	}
... ...
@@ -72,7 +72,7 @@ func (daemon *Daemon) rmLink(name string) error {
72 72
 		return err
73 73
 	}
74 74
 
75
-	parentContainer, _ := daemon.Get(pe.ID())
75
+	parentContainer, _ := daemon.GetContainer(pe.ID())
76 76
 	if parentContainer != nil {
77 77
 		if err := daemon.updateNetwork(parentContainer); err != nil {
78 78
 			logrus.Debugf("Could not update network to remove link %s: %v", n, err)
... ...
@@ -64,7 +64,7 @@ func (d *Daemon) unregisterExecCommand(container *container.Container, execConfi
64 64
 }
65 65
 
66 66
 func (d *Daemon) getActiveContainer(name string) (*container.Container, error) {
67
-	container, err := d.Get(name)
67
+	container, err := d.GetContainer(name)
68 68
 	if err != nil {
69 69
 		return nil, err
70 70
 	}
... ...
@@ -12,7 +12,7 @@ import (
12 12
 // ContainerExport writes the contents of the container to the given
13 13
 // writer. An error is returned if the container cannot be found.
14 14
 func (daemon *Daemon) ContainerExport(name string, out io.Writer) error {
15
-	container, err := daemon.Get(name)
15
+	container, err := daemon.GetContainer(name)
16 16
 	if err != nil {
17 17
 		return err
18 18
 	}
... ...
@@ -28,7 +28,7 @@ func (daemon *Daemon) ContainerInspect(name string, size bool, version version.V
28 28
 }
29 29
 
30 30
 func (daemon *Daemon) containerInspectCurrent(name string, size bool) (*types.ContainerJSON, error) {
31
-	container, err := daemon.Get(name)
31
+	container, err := daemon.GetContainer(name)
32 32
 	if err != nil {
33 33
 		return nil, err
34 34
 	}
... ...
@@ -68,7 +68,7 @@ func (daemon *Daemon) containerInspectCurrent(name string, size bool) (*types.Co
68 68
 
69 69
 // containerInspect120 serializes the master version of a container into a json type.
70 70
 func (daemon *Daemon) containerInspect120(name string) (*v1p20.ContainerJSON, error) {
71
-	container, err := daemon.Get(name)
71
+	container, err := daemon.GetContainer(name)
72 72
 	if err != nil {
73 73
 		return nil, err
74 74
 	}
... ...
@@ -20,7 +20,7 @@ func setPlatformSpecificContainerFields(container *container.Container, contJSON
20 20
 
21 21
 // containerInspectPre120 gets containers for pre 1.20 APIs.
22 22
 func (daemon *Daemon) containerInspectPre120(name string) (*v1p19.ContainerJSON, error) {
23
-	container, err := daemon.Get(name)
23
+	container, err := daemon.GetContainer(name)
24 24
 	if err != nil {
25 25
 		return nil, err
26 26
 	}
... ...
@@ -17,7 +17,7 @@ import (
17 17
 // for the container to exit.
18 18
 // If a signal is given, then just send it to the container and return.
19 19
 func (daemon *Daemon) ContainerKill(name string, sig uint64) error {
20
-	container, err := daemon.Get(name)
20
+	container, err := daemon.GetContainer(name)
21 21
 	if err != nil {
22 22
 		return err
23 23
 	}
... ...
@@ -162,7 +162,7 @@ func (daemon *Daemon) foldFilter(config *ContainersConfig) (*listContext, error)
162 162
 
163 163
 	var beforeContFilter, sinceContFilter *container.Container
164 164
 	err = psFilters.WalkValues("before", func(value string) error {
165
-		beforeContFilter, err = daemon.Get(value)
165
+		beforeContFilter, err = daemon.GetContainer(value)
166 166
 		return err
167 167
 	})
168 168
 	if err != nil {
... ...
@@ -170,7 +170,7 @@ func (daemon *Daemon) foldFilter(config *ContainersConfig) (*listContext, error)
170 170
 	}
171 171
 
172 172
 	err = psFilters.WalkValues("since", func(value string) error {
173
-		sinceContFilter, err = daemon.Get(value)
173
+		sinceContFilter, err = daemon.GetContainer(value)
174 174
 		return err
175 175
 	})
176 176
 	if err != nil {
... ...
@@ -204,14 +204,14 @@ func (daemon *Daemon) foldFilter(config *ContainersConfig) (*listContext, error)
204 204
 	}, 1)
205 205
 
206 206
 	if config.Before != "" && beforeContFilter == nil {
207
-		beforeContFilter, err = daemon.Get(config.Before)
207
+		beforeContFilter, err = daemon.GetContainer(config.Before)
208 208
 		if err != nil {
209 209
 			return nil, err
210 210
 		}
211 211
 	}
212 212
 
213 213
 	if config.Since != "" && sinceContFilter == nil {
214
-		sinceContFilter, err = daemon.Get(config.Since)
214
+		sinceContFilter, err = daemon.GetContainer(config.Since)
215 215
 		if err != nil {
216 216
 			return nil, err
217 217
 		}
... ...
@@ -33,7 +33,7 @@ type ContainerLogsConfig struct {
33 33
 // ContainerLogs hooks up a container's stdout and stderr streams
34 34
 // configured with the given struct.
35 35
 func (daemon *Daemon) ContainerLogs(containerName string, config *ContainerLogsConfig) error {
36
-	container, err := daemon.Get(containerName)
36
+	container, err := daemon.GetContainer(containerName)
37 37
 	if err != nil {
38 38
 		return derr.ErrorCodeNoSuchContainer.WithArgs(containerName)
39 39
 	}
... ...
@@ -130,7 +130,7 @@ func getIpamConfig(data []network.IPAMConfig) ([]*libnetwork.IpamConf, []*libnet
130 130
 // network. If either cannot be found, an err is returned. If the
131 131
 // network cannot be set up, an err is returned.
132 132
 func (daemon *Daemon) ConnectContainerToNetwork(containerName, networkName string) error {
133
-	container, err := daemon.Get(containerName)
133
+	container, err := daemon.GetContainer(containerName)
134 134
 	if err != nil {
135 135
 		return err
136 136
 	}
... ...
@@ -140,7 +140,7 @@ func (daemon *Daemon) ConnectContainerToNetwork(containerName, networkName strin
140 140
 // DisconnectContainerFromNetwork disconnects the given container from
141 141
 // the given network. If either cannot be found, an err is returned.
142 142
 func (daemon *Daemon) DisconnectContainerFromNetwork(containerName string, network libnetwork.Network) error {
143
-	container, err := daemon.Get(containerName)
143
+	container, err := daemon.GetContainer(containerName)
144 144
 	if err != nil {
145 145
 		return err
146 146
 	}
... ...
@@ -7,7 +7,7 @@ import (
7 7
 
8 8
 // ContainerPause pauses a container
9 9
 func (daemon *Daemon) ContainerPause(name string) error {
10
-	container, err := daemon.Get(name)
10
+	container, err := daemon.GetContainer(name)
11 11
 	if err != nil {
12 12
 		return err
13 13
 	}
... ...
@@ -21,7 +21,7 @@ func (daemon *Daemon) ContainerRename(oldName, newName string) error {
21 21
 		return derr.ErrorCodeEmptyRename
22 22
 	}
23 23
 
24
-	container, err := daemon.Get(oldName)
24
+	container, err := daemon.GetContainer(oldName)
25 25
 	if err != nil {
26 26
 		return err
27 27
 	}
... ...
@@ -5,7 +5,7 @@ import derr "github.com/docker/docker/errors"
5 5
 // ContainerResize changes the size of the TTY of the process running
6 6
 // in the container with the given name to the given height and width.
7 7
 func (daemon *Daemon) ContainerResize(name string, height, width int) error {
8
-	container, err := daemon.Get(name)
8
+	container, err := daemon.GetContainer(name)
9 9
 	if err != nil {
10 10
 		return err
11 11
 	}
... ...
@@ -12,7 +12,7 @@ import (
12 12
 // stop. Returns an error if the container cannot be found, or if
13 13
 // there is an underlying error at any stage of the restart.
14 14
 func (daemon *Daemon) ContainerRestart(name string, seconds int) error {
15
-	container, err := daemon.Get(name)
15
+	container, err := daemon.GetContainer(name)
16 16
 	if err != nil {
17 17
 		return err
18 18
 	}
... ...
@@ -11,7 +11,7 @@ import (
11 11
 
12 12
 // ContainerStart starts a container.
13 13
 func (daemon *Daemon) ContainerStart(name string, hostConfig *runconfig.HostConfig) error {
14
-	container, err := daemon.Get(name)
14
+	container, err := daemon.GetContainer(name)
15 15
 	if err != nil {
16 16
 		return err
17 17
 	}
... ...
@@ -22,7 +22,7 @@ type ContainerStatsConfig struct {
22 22
 // ContainerStats writes information about the container to the stream
23 23
 // given in the config object.
24 24
 func (daemon *Daemon) ContainerStats(prefixOrName string, config *ContainerStatsConfig) error {
25
-	container, err := daemon.Get(prefixOrName)
25
+	container, err := daemon.GetContainer(prefixOrName)
26 26
 	if err != nil {
27 27
 		return err
28 28
 	}
... ...
@@ -15,7 +15,7 @@ import (
15 15
 // container is not found, is already stopped, or if there is a
16 16
 // problem stopping the container.
17 17
 func (daemon *Daemon) ContainerStop(name string, seconds int) error {
18
-	container, err := daemon.Get(name)
18
+	container, err := daemon.GetContainer(name)
19 19
 	if err != nil {
20 20
 		return err
21 21
 	}
... ...
@@ -21,7 +21,7 @@ func (daemon *Daemon) ContainerTop(name string, psArgs string) (*types.Container
21 21
 		psArgs = "-ef"
22 22
 	}
23 23
 
24
-	container, err := daemon.Get(name)
24
+	container, err := daemon.GetContainer(name)
25 25
 	if err != nil {
26 26
 		return nil, err
27 27
 	}
... ...
@@ -7,7 +7,7 @@ import (
7 7
 
8 8
 // ContainerUnpause unpauses a container
9 9
 func (daemon *Daemon) ContainerUnpause(name string) error {
10
-	container, err := daemon.Get(name)
10
+	container, err := daemon.GetContainer(name)
11 11
 	if err != nil {
12 12
 		return err
13 13
 	}
... ...
@@ -87,7 +87,7 @@ func (daemon *Daemon) registerMountPoints(container *container.Container, hostCo
87 87
 			return err
88 88
 		}
89 89
 
90
-		c, err := daemon.Get(containerID)
90
+		c, err := daemon.GetContainer(containerID)
91 91
 		if err != nil {
92 92
 			return err
93 93
 		}
... ...
@@ -8,7 +8,7 @@ import "time"
8 8
 // timeout, an error is returned. If you want to wait forever, supply
9 9
 // a negative duration for the timeout.
10 10
 func (daemon *Daemon) ContainerWait(name string, timeout time.Duration) (int, error) {
11
-	container, err := daemon.Get(name)
11
+	container, err := daemon.GetContainer(name)
12 12
 	if err != nil {
13 13
 		return -1, err
14 14
 	}