Merge pull request #18762 from calavera/runconfig_to_types

Move container configuration types to api/types/container.
Upstream-commit: 030347c3c9505fa80eed0ecfde5d1e9af05c3cbc
Component: engine
This commit is contained in:
Alexander Morozov
2015-12-22 14:22:08 -08:00
107 changed files with 1971 additions and 802 deletions
@@ -16,10 +16,10 @@ import (
"time"
"github.com/docker/docker/api/types"
containertypes "github.com/docker/docker/api/types/container"
"github.com/docker/docker/pkg/integration"
"github.com/docker/docker/pkg/integration/checker"
"github.com/docker/docker/pkg/stringid"
"github.com/docker/docker/runconfig"
"github.com/go-check/check"
)
@@ -678,7 +678,7 @@ func UtilCreateNetworkMode(c *check.C, networkMode string) {
var containerJSON types.ContainerJSON
c.Assert(json.Unmarshal(body, &containerJSON), checker.IsNil)
c.Assert(containerJSON.HostConfig.NetworkMode, checker.Equals, runconfig.NetworkMode(networkMode), check.Commentf("Mismatched NetworkMode"))
c.Assert(containerJSON.HostConfig.NetworkMode, checker.Equals, containertypes.NetworkMode(networkMode), check.Commentf("Mismatched NetworkMode"))
}
func (s *DockerSuite) TestContainerApiCreateWithCpuSharesCpuset(c *check.C) {
@@ -13,8 +13,8 @@ import (
"io/ioutil"
"github.com/docker/docker/pkg/integration/checker"
"github.com/docker/docker/pkg/nat"
"github.com/docker/docker/pkg/stringid"
"github.com/docker/go-connections/nat"
"github.com/go-check/check"
)
@@ -9,8 +9,8 @@ import (
"time"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/pkg/integration/checker"
"github.com/docker/docker/runconfig"
"github.com/go-check/check"
)
@@ -281,7 +281,7 @@ func (s *DockerSuite) TestInspectTimesAsRFC3339Nano(c *check.C) {
func (s *DockerSuite) TestInspectLogConfigNoType(c *check.C) {
testRequires(c, DaemonIsLinux)
dockerCmd(c, "create", "--name=test", "--log-opt", "max-file=42", "busybox")
var logConfig runconfig.LogConfig
var logConfig container.LogConfig
out, err := inspectFieldJSON("test", "HostConfig.LogConfig")
c.Assert(err, checker.IsNil, check.Commentf("%v", out))
@@ -20,8 +20,8 @@ import (
"github.com/docker/docker/pkg/integration/checker"
"github.com/docker/docker/pkg/mount"
"github.com/docker/docker/pkg/nat"
"github.com/docker/docker/runconfig"
"github.com/docker/go-connections/nat"
"github.com/docker/libnetwork/resolvconf"
"github.com/go-check/check"
)