mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
No need for a Container.networkManager field: it can be accessed via Container.runtime
This commit is contained in:
parent
1ed13f65fe
commit
d65983f386
2 changed files with 1 additions and 3 deletions
|
@ -32,7 +32,6 @@ type Container struct {
|
||||||
Image string
|
Image string
|
||||||
|
|
||||||
network *NetworkInterface
|
network *NetworkInterface
|
||||||
networkManager *NetworkManager
|
|
||||||
NetworkSettings *NetworkSettings
|
NetworkSettings *NetworkSettings
|
||||||
|
|
||||||
SysInitPath string
|
SysInitPath string
|
||||||
|
@ -266,7 +265,7 @@ func (container *Container) StderrPipe() (io.ReadCloser, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (container *Container) allocateNetwork() error {
|
func (container *Container) allocateNetwork() error {
|
||||||
iface, err := container.networkManager.Allocate()
|
iface, err := container.runtime.networkManager.Allocate()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,7 +115,6 @@ func (runtime *Runtime) Register(container *Container) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
container.runtime = runtime
|
container.runtime = runtime
|
||||||
container.networkManager = runtime.networkManager // FIXME: infer from docker.runtime
|
|
||||||
// Setup state lock (formerly in newState()
|
// Setup state lock (formerly in newState()
|
||||||
lock := new(sync.Mutex)
|
lock := new(sync.Mutex)
|
||||||
container.State.stateChangeLock = lock
|
container.State.stateChangeLock = lock
|
||||||
|
|
Loading…
Reference in a new issue