diff --git a/api/client/attach.go b/api/client/attach.go index 1cb097dfb5..6bfe1be187 100644 --- a/api/client/attach.go +++ b/api/client/attach.go @@ -5,10 +5,10 @@ import ( "io" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types" Cli "github.com/docker/docker/cli" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/pkg/signal" + "github.com/docker/engine-api/types" ) // CmdAttach attaches to a running container. diff --git a/api/client/build.go b/api/client/build.go index 0706b2f0c6..ee470bcd05 100644 --- a/api/client/build.go +++ b/api/client/build.go @@ -15,8 +15,6 @@ import ( "strings" "github.com/docker/docker/api" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" "github.com/docker/docker/builder/dockerignore" Cli "github.com/docker/docker/cli" "github.com/docker/docker/opts" @@ -31,6 +29,8 @@ import ( "github.com/docker/docker/pkg/urlutil" "github.com/docker/docker/reference" runconfigopts "github.com/docker/docker/runconfig/opts" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/container" "github.com/docker/go-units" ) diff --git a/api/client/cli.go b/api/client/cli.go index 4f4362d90b..5d54ccfaf9 100644 --- a/api/client/cli.go +++ b/api/client/cli.go @@ -9,12 +9,12 @@ import ( "runtime" "github.com/docker/docker/api" - "github.com/docker/docker/api/client/lib" "github.com/docker/docker/cli" "github.com/docker/docker/cliconfig" "github.com/docker/docker/dockerversion" "github.com/docker/docker/opts" "github.com/docker/docker/pkg/term" + "github.com/docker/engine-api/client" "github.com/docker/go-connections/tlsconfig" ) @@ -120,7 +120,7 @@ func NewDockerCli(in io.ReadCloser, out, err io.Writer, clientFlags *cli.ClientF return err } - client, err := lib.NewClient(host, verStr, clientTransport, customHeaders) + client, err := client.NewClient(host, verStr, clientTransport, customHeaders) if err != nil { return err } diff --git a/api/client/client.go b/api/client/client.go index d820dad12e..4bea72c6c7 100644 --- a/api/client/client.go +++ b/api/client/client.go @@ -7,11 +7,11 @@ package client import ( "io" - "github.com/docker/docker/api/client/lib" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" - "github.com/docker/docker/api/types/filters" - "github.com/docker/docker/api/types/registry" + "github.com/docker/engine-api/client" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/container" + "github.com/docker/engine-api/types/filters" + "github.com/docker/engine-api/types/registry" ) // apiClient is an interface that clients that talk with a docker server must implement. @@ -55,10 +55,10 @@ type apiClient interface { ImageInspectWithRaw(imageID string, getSize bool) (types.ImageInspect, []byte, error) ImageList(options types.ImageListOptions) ([]types.Image, error) ImageLoad(input io.Reader) (types.ImageLoadResponse, error) - ImagePull(options types.ImagePullOptions, privilegeFunc lib.RequestPrivilegeFunc) (io.ReadCloser, error) - ImagePush(options types.ImagePushOptions, privilegeFunc lib.RequestPrivilegeFunc) (io.ReadCloser, error) + ImagePull(options types.ImagePullOptions, privilegeFunc client.RequestPrivilegeFunc) (io.ReadCloser, error) + ImagePush(options types.ImagePushOptions, privilegeFunc client.RequestPrivilegeFunc) (io.ReadCloser, error) ImageRemove(options types.ImageRemoveOptions) ([]types.ImageDelete, error) - ImageSearch(options types.ImageSearchOptions, privilegeFunc lib.RequestPrivilegeFunc) ([]registry.SearchResult, error) + ImageSearch(options types.ImageSearchOptions, privilegeFunc client.RequestPrivilegeFunc) ([]registry.SearchResult, error) ImageSave(imageIDs []string) (io.ReadCloser, error) ImageTag(options types.ImageTagOptions) error Info() (types.Info, error) diff --git a/api/client/commit.go b/api/client/commit.go index 48678d4d8f..4c0d5c28d8 100644 --- a/api/client/commit.go +++ b/api/client/commit.go @@ -5,12 +5,12 @@ import ( "errors" "fmt" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" Cli "github.com/docker/docker/cli" "github.com/docker/docker/opts" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/reference" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/container" ) // CmdCommit creates a new image from a container's changes. diff --git a/api/client/cp.go b/api/client/cp.go index 0c3f19ffc6..43573d906b 100644 --- a/api/client/cp.go +++ b/api/client/cp.go @@ -7,11 +7,11 @@ import ( "path/filepath" "strings" - "github.com/docker/docker/api/types" Cli "github.com/docker/docker/cli" "github.com/docker/docker/pkg/archive" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/pkg/system" + "github.com/docker/engine-api/types" ) type copyDirection int diff --git a/api/client/create.go b/api/client/create.go index 2569ae755a..fce4062f81 100644 --- a/api/client/create.go +++ b/api/client/create.go @@ -5,14 +5,14 @@ import ( "io" "os" - "github.com/docker/docker/api/client/lib" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" Cli "github.com/docker/docker/cli" "github.com/docker/docker/pkg/jsonmessage" "github.com/docker/docker/reference" "github.com/docker/docker/registry" runconfigopts "github.com/docker/docker/runconfig/opts" + "github.com/docker/engine-api/client" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/container" ) func (cli *DockerCli) pullImage(image string) error { @@ -110,7 +110,7 @@ func (cli *DockerCli) createContainer(config *container.Config, hostConfig *cont response, err := cli.client.ContainerCreate(config, hostConfig, name) //if image not found try to pull it if err != nil { - if lib.IsErrImageNotFound(err) { + if client.IsErrImageNotFound(err) { fmt.Fprintf(cli.err, "Unable to find image '%s' locally\n", ref.String()) // we don't want to write to stdout anything apart from container.ID diff --git a/api/client/events.go b/api/client/events.go index 4ceaf43f84..c2a6ab3bb1 100644 --- a/api/client/events.go +++ b/api/client/events.go @@ -7,13 +7,13 @@ import ( "strings" "time" - "github.com/docker/docker/api/types" - eventtypes "github.com/docker/docker/api/types/events" - "github.com/docker/docker/api/types/filters" Cli "github.com/docker/docker/cli" "github.com/docker/docker/opts" "github.com/docker/docker/pkg/jsonlog" flag "github.com/docker/docker/pkg/mflag" + "github.com/docker/engine-api/types" + eventtypes "github.com/docker/engine-api/types/events" + "github.com/docker/engine-api/types/filters" ) // CmdEvents prints a live stream of real time events from the server. diff --git a/api/client/exec.go b/api/client/exec.go index ac2e65868d..0ce9e81fe3 100644 --- a/api/client/exec.go +++ b/api/client/exec.go @@ -5,10 +5,10 @@ import ( "io" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types" Cli "github.com/docker/docker/cli" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/pkg/promise" + "github.com/docker/engine-api/types" ) // CmdExec runs a command in a running container. diff --git a/api/client/exec_test.go b/api/client/exec_test.go index 7fd4f7aded..1680fa6e79 100644 --- a/api/client/exec_test.go +++ b/api/client/exec_test.go @@ -5,8 +5,8 @@ import ( "io/ioutil" "testing" - "github.com/docker/docker/api/types" flag "github.com/docker/docker/pkg/mflag" + "github.com/docker/engine-api/types" ) type arguments struct { diff --git a/api/client/formatter/custom.go b/api/client/formatter/custom.go index 97cdbc1896..8a680705ca 100644 --- a/api/client/formatter/custom.go +++ b/api/client/formatter/custom.go @@ -7,9 +7,9 @@ import ( "time" "github.com/docker/docker/api" - "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/stringid" "github.com/docker/docker/pkg/stringutils" + "github.com/docker/engine-api/types" "github.com/docker/go-units" ) diff --git a/api/client/formatter/custom_test.go b/api/client/formatter/custom_test.go index fee3ba889f..608622564a 100644 --- a/api/client/formatter/custom_test.go +++ b/api/client/formatter/custom_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/stringid" + "github.com/docker/engine-api/types" ) func TestContainerPsContext(t *testing.T) { diff --git a/api/client/formatter/formatter.go b/api/client/formatter/formatter.go index 2e19e9396a..749148ac82 100644 --- a/api/client/formatter/formatter.go +++ b/api/client/formatter/formatter.go @@ -8,8 +8,8 @@ import ( "text/tabwriter" "text/template" - "github.com/docker/docker/api/types" "github.com/docker/docker/reference" + "github.com/docker/engine-api/types" ) const ( diff --git a/api/client/formatter/formatter_test.go b/api/client/formatter/formatter_test.go index 6d7185311c..223cab970a 100644 --- a/api/client/formatter/formatter_test.go +++ b/api/client/formatter/formatter_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) func TestContainerContextWrite(t *testing.T) { diff --git a/api/client/hijack.go b/api/client/hijack.go index 72f5ed43de..ea4b5e3875 100644 --- a/api/client/hijack.go +++ b/api/client/hijack.go @@ -5,9 +5,9 @@ import ( "os" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/stdcopy" "github.com/docker/docker/pkg/term" + "github.com/docker/engine-api/types" ) func (cli *DockerCli) holdHijackedConnection(setRawTerminal bool, inputStream io.ReadCloser, outputStream, errorStream io.Writer, resp types.HijackedResponse) error { diff --git a/api/client/images.go b/api/client/images.go index ef19bd32f3..2b0b4045d2 100644 --- a/api/client/images.go +++ b/api/client/images.go @@ -2,11 +2,11 @@ package client import ( "github.com/docker/docker/api/client/formatter" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/filters" Cli "github.com/docker/docker/cli" "github.com/docker/docker/opts" flag "github.com/docker/docker/pkg/mflag" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/filters" ) // CmdImages lists the images in a specified repository, or all top-level images if no repository is specified. diff --git a/api/client/import.go b/api/client/import.go index 692566d72b..ece821aef6 100644 --- a/api/client/import.go +++ b/api/client/import.go @@ -5,13 +5,13 @@ import ( "io" "os" - "github.com/docker/docker/api/types" Cli "github.com/docker/docker/cli" "github.com/docker/docker/opts" "github.com/docker/docker/pkg/jsonmessage" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/pkg/urlutil" "github.com/docker/docker/reference" + "github.com/docker/engine-api/types" ) // CmdImport creates an empty filesystem image, imports the contents of the tarball into the image, and optionally tags the image. diff --git a/api/client/inspect.go b/api/client/inspect.go index 375129bdaa..5401d3bc3d 100644 --- a/api/client/inspect.go +++ b/api/client/inspect.go @@ -6,9 +6,9 @@ import ( "text/template" "github.com/docker/docker/api/client/inspect" - "github.com/docker/docker/api/client/lib" Cli "github.com/docker/docker/cli" flag "github.com/docker/docker/pkg/mflag" + "github.com/docker/engine-api/client" ) var funcMap = template.FuncMap{ @@ -64,10 +64,10 @@ func (cli *DockerCli) inspectAll(getSize bool) inspectSearcher { c, rawContainer, err := cli.client.ContainerInspectWithRaw(ref, getSize) if err != nil { // Search for image with that id if a container doesn't exist. - if lib.IsErrContainerNotFound(err) { + if client.IsErrContainerNotFound(err) { i, rawImage, err := cli.client.ImageInspectWithRaw(ref, getSize) if err != nil { - if lib.IsErrImageNotFound(err) { + if client.IsErrImageNotFound(err) { return nil, nil, fmt.Errorf("Error: No such image or container: %s", ref) } return nil, nil, err diff --git a/api/client/lib/client_test.go b/api/client/lib/client_test.go deleted file mode 100644 index 97634beb85..0000000000 --- a/api/client/lib/client_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package lib - -import ( - "net/url" - "testing" -) - -func TestGetAPIPath(t *testing.T) { - cases := []struct { - v string - p string - q url.Values - e string - }{ - {"", "/containers/json", nil, "/containers/json"}, - {"", "/containers/json", url.Values{}, "/containers/json"}, - {"", "/containers/json", url.Values{"s": []string{"c"}}, "/containers/json?s=c"}, - {"1.22", "/containers/json", nil, "/v1.22/containers/json"}, - {"1.22", "/containers/json", url.Values{}, "/v1.22/containers/json"}, - {"1.22", "/containers/json", url.Values{"s": []string{"c"}}, "/v1.22/containers/json?s=c"}, - {"v1.22", "/containers/json", nil, "/v1.22/containers/json"}, - {"v1.22", "/containers/json", url.Values{}, "/v1.22/containers/json"}, - {"v1.22", "/containers/json", url.Values{"s": []string{"c"}}, "/v1.22/containers/json?s=c"}, - } - - for _, cs := range cases { - c, err := NewClient("unix:///var/run/docker.sock", cs.v, nil, nil) - if err != nil { - t.Fatal(err) - } - g := c.getAPIPath(cs.p, cs.q) - if g != cs.e { - t.Fatalf("Expected %s, got %s", cs.e, g) - } - } -} diff --git a/api/client/lib/image_build_test.go b/api/client/lib/image_build_test.go deleted file mode 100644 index a1737f14c9..0000000000 --- a/api/client/lib/image_build_test.go +++ /dev/null @@ -1,17 +0,0 @@ -package lib - -import "testing" - -func TestGetDockerOS(t *testing.T) { - cases := map[string]string{ - "Docker/v1.22 (linux)": "linux", - "Docker/v1.22 (windows)": "windows", - "Foo/v1.22 (bar)": "", - } - for header, os := range cases { - g := getDockerOS(header) - if g != os { - t.Fatalf("Expected %s, got %s", os, g) - } - } -} diff --git a/api/client/login.go b/api/client/login.go index 3b7a547175..a396450de1 100644 --- a/api/client/login.go +++ b/api/client/login.go @@ -8,12 +8,12 @@ import ( "runtime" "strings" - "github.com/docker/docker/api/client/lib" - "github.com/docker/docker/api/types" Cli "github.com/docker/docker/cli" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/pkg/term" "github.com/docker/docker/registry" + "github.com/docker/engine-api/client" + "github.com/docker/engine-api/types" ) // CmdLogin logs in or registers a user to a Docker registry service. @@ -122,7 +122,7 @@ func (cli *DockerCli) CmdLogin(args ...string) error { auth := cli.configFile.AuthConfigs[serverAddress] response, err := cli.client.RegistryLogin(auth) if err != nil { - if lib.IsErrUnauthorized(err) { + if client.IsErrUnauthorized(err) { delete(cli.configFile.AuthConfigs, serverAddress) if err2 := cli.configFile.Save(); err2 != nil { fmt.Fprintf(cli.out, "WARNING: could not save config file: %v\n", err2) diff --git a/api/client/logs.go b/api/client/logs.go index 77c754f4da..92b75e0505 100644 --- a/api/client/logs.go +++ b/api/client/logs.go @@ -4,10 +4,10 @@ import ( "fmt" "io" - "github.com/docker/docker/api/types" Cli "github.com/docker/docker/cli" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/pkg/stdcopy" + "github.com/docker/engine-api/types" ) var validDrivers = map[string]bool{ diff --git a/api/client/network.go b/api/client/network.go index 8c769d56db..31cd4dbfd3 100644 --- a/api/client/network.go +++ b/api/client/network.go @@ -6,13 +6,13 @@ import ( "strings" "text/tabwriter" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/filters" - "github.com/docker/docker/api/types/network" Cli "github.com/docker/docker/cli" "github.com/docker/docker/opts" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/pkg/stringid" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/filters" + "github.com/docker/engine-api/types/network" ) // CmdNetwork is the parent subcommand for all network commands diff --git a/api/client/ps.go b/api/client/ps.go index 3f02fa1d60..c0589738d6 100644 --- a/api/client/ps.go +++ b/api/client/ps.go @@ -2,11 +2,11 @@ package client import ( "github.com/docker/docker/api/client/formatter" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/filters" Cli "github.com/docker/docker/cli" "github.com/docker/docker/opts" flag "github.com/docker/docker/pkg/mflag" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/filters" ) // CmdPs outputs a list of Docker containers. diff --git a/api/client/pull.go b/api/client/pull.go index 361c341d06..5566d7976f 100644 --- a/api/client/pull.go +++ b/api/client/pull.go @@ -4,13 +4,13 @@ import ( "errors" "fmt" - "github.com/docker/docker/api/client/lib" - "github.com/docker/docker/api/types" Cli "github.com/docker/docker/cli" "github.com/docker/docker/pkg/jsonmessage" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/reference" "github.com/docker/docker/registry" + "github.com/docker/engine-api/client" + "github.com/docker/engine-api/types" ) // CmdPull pulls an image or a repository from the registry. @@ -65,7 +65,7 @@ func (cli *DockerCli) CmdPull(args ...string) error { return cli.imagePullPrivileged(authConfig, distributionRef.String(), "", requestPrivilege) } -func (cli *DockerCli) imagePullPrivileged(authConfig types.AuthConfig, imageID, tag string, requestPrivilege lib.RequestPrivilegeFunc) error { +func (cli *DockerCli) imagePullPrivileged(authConfig types.AuthConfig, imageID, tag string, requestPrivilege client.RequestPrivilegeFunc) error { encodedAuth, err := encodeAuthToBase64(authConfig) if err != nil { diff --git a/api/client/push.go b/api/client/push.go index cc78c3c5b3..bbfbaf5fea 100644 --- a/api/client/push.go +++ b/api/client/push.go @@ -4,13 +4,13 @@ import ( "errors" "io" - "github.com/docker/docker/api/client/lib" - "github.com/docker/docker/api/types" Cli "github.com/docker/docker/cli" "github.com/docker/docker/pkg/jsonmessage" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/reference" "github.com/docker/docker/registry" + "github.com/docker/engine-api/client" + "github.com/docker/engine-api/types" ) // CmdPush pushes an image or repository to the registry. @@ -52,7 +52,7 @@ func (cli *DockerCli) CmdPush(args ...string) error { return cli.imagePushPrivileged(authConfig, ref.Name(), tag, cli.out, requestPrivilege) } -func (cli *DockerCli) imagePushPrivileged(authConfig types.AuthConfig, imageID, tag string, outputStream io.Writer, requestPrivilege lib.RequestPrivilegeFunc) error { +func (cli *DockerCli) imagePushPrivileged(authConfig types.AuthConfig, imageID, tag string, outputStream io.Writer, requestPrivilege client.RequestPrivilegeFunc) error { encodedAuth, err := encodeAuthToBase64(authConfig) if err != nil { return err diff --git a/api/client/rm.go b/api/client/rm.go index b26cb53d02..39d22f669c 100644 --- a/api/client/rm.go +++ b/api/client/rm.go @@ -4,9 +4,9 @@ import ( "fmt" "strings" - "github.com/docker/docker/api/types" Cli "github.com/docker/docker/cli" flag "github.com/docker/docker/pkg/mflag" + "github.com/docker/engine-api/types" ) // CmdRm removes one or more containers. diff --git a/api/client/rmi.go b/api/client/rmi.go index 9569370ea2..c5593d6d04 100644 --- a/api/client/rmi.go +++ b/api/client/rmi.go @@ -4,9 +4,9 @@ import ( "fmt" "net/url" - "github.com/docker/docker/api/types" Cli "github.com/docker/docker/cli" flag "github.com/docker/docker/pkg/mflag" + "github.com/docker/engine-api/types" ) // CmdRmi removes all images with the specified name(s). diff --git a/api/client/run.go b/api/client/run.go index 0a7f5265ca..3eea9dc667 100644 --- a/api/client/run.go +++ b/api/client/run.go @@ -8,13 +8,13 @@ import ( "strings" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types" Cli "github.com/docker/docker/cli" derr "github.com/docker/docker/errors" "github.com/docker/docker/opts" "github.com/docker/docker/pkg/promise" "github.com/docker/docker/pkg/signal" runconfigopts "github.com/docker/docker/runconfig/opts" + "github.com/docker/engine-api/types" "github.com/docker/libnetwork/resolvconf/dns" ) diff --git a/api/client/search.go b/api/client/search.go index d627ef653d..64bbb67ea7 100644 --- a/api/client/search.go +++ b/api/client/search.go @@ -7,12 +7,12 @@ import ( "strings" "text/tabwriter" - "github.com/docker/docker/api/types" - registrytypes "github.com/docker/docker/api/types/registry" Cli "github.com/docker/docker/cli" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/pkg/stringutils" "github.com/docker/docker/registry" + "github.com/docker/engine-api/types" + registrytypes "github.com/docker/engine-api/types/registry" ) // CmdSearch searches the Docker Hub for images. diff --git a/api/client/start.go b/api/client/start.go index fcfa3f366d..3a2bc12636 100644 --- a/api/client/start.go +++ b/api/client/start.go @@ -7,11 +7,11 @@ import ( "strings" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types" Cli "github.com/docker/docker/cli" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/pkg/promise" "github.com/docker/docker/pkg/signal" + "github.com/docker/engine-api/types" ) func (cli *DockerCli) forwardAllSignals(cid string) chan os.Signal { diff --git a/api/client/stats.go b/api/client/stats.go index 968d17eab4..46f4c04b9f 100644 --- a/api/client/stats.go +++ b/api/client/stats.go @@ -10,10 +10,10 @@ import ( "text/tabwriter" "time" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/events" - "github.com/docker/docker/api/types/filters" Cli "github.com/docker/docker/cli" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/events" + "github.com/docker/engine-api/types/filters" "github.com/docker/go-units" ) diff --git a/api/client/stats_unit_test.go b/api/client/stats_unit_test.go index 301e0a6782..ce1c3a1741 100644 --- a/api/client/stats_unit_test.go +++ b/api/client/stats_unit_test.go @@ -5,7 +5,7 @@ import ( "sync" "testing" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) func TestDisplay(t *testing.T) { diff --git a/api/client/tag.go b/api/client/tag.go index a1492666d0..5a824714bd 100644 --- a/api/client/tag.go +++ b/api/client/tag.go @@ -3,10 +3,10 @@ package client import ( "errors" - "github.com/docker/docker/api/types" Cli "github.com/docker/docker/cli" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/reference" + "github.com/docker/engine-api/types" ) // CmdTag tags an image into a repository. diff --git a/api/client/trust.go b/api/client/trust.go index cc93ebae00..31f47e468c 100644 --- a/api/client/trust.go +++ b/api/client/trust.go @@ -21,15 +21,15 @@ import ( "github.com/docker/distribution/digest" "github.com/docker/distribution/registry/client/auth" "github.com/docker/distribution/registry/client/transport" - "github.com/docker/docker/api/client/lib" - "github.com/docker/docker/api/types" - registrytypes "github.com/docker/docker/api/types/registry" "github.com/docker/docker/cliconfig" "github.com/docker/docker/pkg/ansiescape" "github.com/docker/docker/pkg/ioutils" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/reference" "github.com/docker/docker/registry" + apiclient "github.com/docker/engine-api/client" + "github.com/docker/engine-api/types" + registrytypes "github.com/docker/engine-api/types/registry" "github.com/docker/go-connections/tlsconfig" "github.com/docker/notary/client" "github.com/docker/notary/passphrase" @@ -280,7 +280,7 @@ func notaryError(err error) error { return err } -func (cli *DockerCli) trustedPull(repoInfo *registry.RepositoryInfo, ref registry.Reference, authConfig types.AuthConfig, requestPrivilege lib.RequestPrivilegeFunc) error { +func (cli *DockerCli) trustedPull(repoInfo *registry.RepositoryInfo, ref registry.Reference, authConfig types.AuthConfig, requestPrivilege apiclient.RequestPrivilegeFunc) error { var refs []target notaryRepo, err := cli.getNotaryRepository(repoInfo, authConfig) @@ -383,7 +383,7 @@ func targetStream(in io.Writer) (io.WriteCloser, <-chan []target) { return ioutils.NewWriteCloserWrapper(out, w.Close), targetChan } -func (cli *DockerCli) trustedPush(repoInfo *registry.RepositoryInfo, tag string, authConfig types.AuthConfig, requestPrivilege lib.RequestPrivilegeFunc) error { +func (cli *DockerCli) trustedPush(repoInfo *registry.RepositoryInfo, tag string, authConfig types.AuthConfig, requestPrivilege apiclient.RequestPrivilegeFunc) error { streamOut, targetChan := targetStream(cli.out) reqError := cli.imagePushPrivileged(authConfig, repoInfo.Name(), tag, streamOut, requestPrivilege) diff --git a/api/client/trust_test.go b/api/client/trust_test.go index 86f9e61e4d..ec95bd9d35 100644 --- a/api/client/trust_test.go +++ b/api/client/trust_test.go @@ -4,8 +4,8 @@ import ( "os" "testing" - registrytypes "github.com/docker/docker/api/types/registry" "github.com/docker/docker/registry" + registrytypes "github.com/docker/engine-api/types/registry" ) func unsetENV() { diff --git a/api/client/update.go b/api/client/update.go index 3f71171264..d1e1fd3254 100644 --- a/api/client/update.go +++ b/api/client/update.go @@ -3,9 +3,9 @@ package client import ( "fmt" - "github.com/docker/docker/api/types/container" Cli "github.com/docker/docker/cli" flag "github.com/docker/docker/pkg/mflag" + "github.com/docker/engine-api/types/container" "github.com/docker/go-units" ) diff --git a/api/client/utils.go b/api/client/utils.go index af58728866..687add5bc2 100644 --- a/api/client/utils.go +++ b/api/client/utils.go @@ -10,12 +10,12 @@ import ( "time" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/client/lib" - "github.com/docker/docker/api/types" - registrytypes "github.com/docker/docker/api/types/registry" "github.com/docker/docker/pkg/signal" "github.com/docker/docker/pkg/term" "github.com/docker/docker/registry" + "github.com/docker/engine-api/client" + "github.com/docker/engine-api/types" + registrytypes "github.com/docker/engine-api/types/registry" ) // encodeAuthToBase64 serializes the auth configuration as JSON base64 payload @@ -32,7 +32,7 @@ func (cli *DockerCli) encodeRegistryAuth(index *registrytypes.IndexInfo) (string return encodeAuthToBase64(authConfig) } -func (cli *DockerCli) registryAuthenticationPrivilegedFunc(index *registrytypes.IndexInfo, cmdName string) lib.RequestPrivilegeFunc { +func (cli *DockerCli) registryAuthenticationPrivilegedFunc(index *registrytypes.IndexInfo, cmdName string) client.RequestPrivilegeFunc { return func() (string, error) { fmt.Fprintf(cli.out, "\nPlease login prior to %s:\n", cmdName) if err := cli.CmdLogin(registry.GetAuthConfigKey(index)); err != nil { @@ -72,7 +72,7 @@ func getExitCode(cli *DockerCli, containerID string) (bool, int, error) { c, err := cli.client.ContainerInspect(containerID) if err != nil { // If we can't connect, then the daemon probably died. - if err != lib.ErrConnectionFailed { + if err != client.ErrConnectionFailed { return false, -1, err } return false, -1, nil @@ -87,7 +87,7 @@ func getExecExitCode(cli *DockerCli, execID string) (bool, int, error) { resp, err := cli.client.ContainerExecInspect(execID) if err != nil { // If we can't connect, then the daemon probably died. - if err != lib.ErrConnectionFailed { + if err != client.ErrConnectionFailed { return false, -1, err } return false, -1, nil diff --git a/api/client/version.go b/api/client/version.go index 83ba89660b..a64deef69a 100644 --- a/api/client/version.go +++ b/api/client/version.go @@ -5,11 +5,11 @@ import ( "text/template" "time" - "github.com/docker/docker/api/types" Cli "github.com/docker/docker/cli" "github.com/docker/docker/dockerversion" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/utils" + "github.com/docker/engine-api/types" ) var versionTemplate = `Client: diff --git a/api/client/volume.go b/api/client/volume.go index 53ad3da780..284e30c3cb 100644 --- a/api/client/volume.go +++ b/api/client/volume.go @@ -4,11 +4,11 @@ import ( "fmt" "text/tabwriter" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/filters" Cli "github.com/docker/docker/cli" "github.com/docker/docker/opts" flag "github.com/docker/docker/pkg/mflag" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/filters" ) // CmdVolume is the parent subcommand for all volume commands diff --git a/api/common.go b/api/common.go index ca7f0dc869..96064a83a1 100644 --- a/api/common.go +++ b/api/common.go @@ -9,9 +9,9 @@ import ( "strings" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/system" "github.com/docker/docker/pkg/version" + "github.com/docker/engine-api/types" "github.com/docker/libtrust" ) diff --git a/api/common_test.go b/api/common_test.go index a513c75212..4f36b45471 100644 --- a/api/common_test.go +++ b/api/common_test.go @@ -7,7 +7,7 @@ import ( "os" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) type ports struct { diff --git a/api/server/router/build/build_routes.go b/api/server/router/build/build_routes.go index 0fec49586b..2962d87f35 100644 --- a/api/server/router/build/build_routes.go +++ b/api/server/router/build/build_routes.go @@ -13,8 +13,6 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/docker/api/server/httputils" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" "github.com/docker/docker/builder" "github.com/docker/docker/builder/dockerfile" "github.com/docker/docker/daemon/daemonbuilder" @@ -25,6 +23,8 @@ import ( "github.com/docker/docker/pkg/streamformatter" "github.com/docker/docker/reference" "github.com/docker/docker/utils" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/container" "github.com/docker/go-units" "golang.org/x/net/context" ) diff --git a/api/server/router/container/backend.go b/api/server/router/container/backend.go index cdb50bca81..80bed6442e 100644 --- a/api/server/router/container/backend.go +++ b/api/server/router/container/backend.go @@ -4,12 +4,12 @@ import ( "io" "time" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" "github.com/docker/docker/daemon" "github.com/docker/docker/daemon/exec" "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/version" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/container" ) // execBackend includes functions to implement to provide exec functionality. diff --git a/api/server/router/container/container_routes.go b/api/server/router/container/container_routes.go index 5fde786697..8a7de24fe1 100644 --- a/api/server/router/container/container_routes.go +++ b/api/server/router/container/container_routes.go @@ -12,9 +12,6 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/distribution/registry/api/errcode" "github.com/docker/docker/api/server/httputils" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" - timetypes "github.com/docker/docker/api/types/time" "github.com/docker/docker/daemon" derr "github.com/docker/docker/errors" "github.com/docker/docker/pkg/ioutils" @@ -22,6 +19,9 @@ import ( "github.com/docker/docker/pkg/term" "github.com/docker/docker/runconfig" "github.com/docker/docker/utils" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/container" + timetypes "github.com/docker/engine-api/types/time" "golang.org/x/net/context" "golang.org/x/net/websocket" ) diff --git a/api/server/router/container/copy.go b/api/server/router/container/copy.go index 4f04f94a3c..69584b31f5 100644 --- a/api/server/router/container/copy.go +++ b/api/server/router/container/copy.go @@ -10,7 +10,7 @@ import ( "strings" "github.com/docker/docker/api/server/httputils" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" "golang.org/x/net/context" ) diff --git a/api/server/router/container/exec.go b/api/server/router/container/exec.go index b2735638c8..caa5da061d 100644 --- a/api/server/router/container/exec.go +++ b/api/server/router/container/exec.go @@ -9,9 +9,9 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/docker/api/server/httputils" - "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/stdcopy" "github.com/docker/docker/utils" + "github.com/docker/engine-api/types" "golang.org/x/net/context" ) diff --git a/api/server/router/local/image.go b/api/server/router/local/image.go index 450c6dd65e..b43c8ddc2f 100644 --- a/api/server/router/local/image.go +++ b/api/server/router/local/image.go @@ -11,14 +11,14 @@ import ( "github.com/docker/distribution/digest" "github.com/docker/docker/api/server/httputils" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" "github.com/docker/docker/builder/dockerfile" derr "github.com/docker/docker/errors" "github.com/docker/docker/pkg/ioutils" "github.com/docker/docker/pkg/streamformatter" "github.com/docker/docker/reference" "github.com/docker/docker/runconfig" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/container" "golang.org/x/net/context" ) diff --git a/api/server/router/network/backend.go b/api/server/router/network/backend.go index c3d6101db6..9b62e0c33f 100644 --- a/api/server/router/network/backend.go +++ b/api/server/router/network/backend.go @@ -1,7 +1,7 @@ package network import ( - "github.com/docker/docker/api/types/network" + "github.com/docker/engine-api/types/network" "github.com/docker/libnetwork" ) diff --git a/api/server/router/network/filter.go b/api/server/router/network/filter.go index 58bdb10449..31d8d0c521 100644 --- a/api/server/router/network/filter.go +++ b/api/server/router/network/filter.go @@ -5,8 +5,8 @@ import ( "regexp" "strings" - "github.com/docker/docker/api/types/filters" "github.com/docker/docker/runconfig" + "github.com/docker/engine-api/types/filters" "github.com/docker/libnetwork" ) diff --git a/api/server/router/network/network_routes.go b/api/server/router/network/network_routes.go index 86ef6854c1..7ba59bd474 100644 --- a/api/server/router/network/network_routes.go +++ b/api/server/router/network/network_routes.go @@ -8,11 +8,11 @@ import ( "golang.org/x/net/context" "github.com/docker/docker/api/server/httputils" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/filters" - "github.com/docker/docker/api/types/network" "github.com/docker/docker/daemon" "github.com/docker/docker/runconfig" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/filters" + "github.com/docker/engine-api/types/network" "github.com/docker/libnetwork" ) diff --git a/api/server/router/system/backend.go b/api/server/router/system/backend.go index bc218087d9..8a270027ff 100644 --- a/api/server/router/system/backend.go +++ b/api/server/router/system/backend.go @@ -1,9 +1,9 @@ package system import ( - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/events" - "github.com/docker/docker/api/types/filters" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/events" + "github.com/docker/engine-api/types/filters" ) // Backend is the methods that need to be implemented to provide diff --git a/api/server/router/system/system_routes.go b/api/server/router/system/system_routes.go index afd60a0042..40ec748a88 100644 --- a/api/server/router/system/system_routes.go +++ b/api/server/router/system/system_routes.go @@ -8,11 +8,11 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/docker/api" "github.com/docker/docker/api/server/httputils" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/events" - "github.com/docker/docker/api/types/filters" - timetypes "github.com/docker/docker/api/types/time" "github.com/docker/docker/pkg/ioutils" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/events" + "github.com/docker/engine-api/types/filters" + timetypes "github.com/docker/engine-api/types/time" "golang.org/x/net/context" ) diff --git a/api/server/router/volume/backend.go b/api/server/router/volume/backend.go index 0c09b073e2..ede5dc4d91 100644 --- a/api/server/router/volume/backend.go +++ b/api/server/router/volume/backend.go @@ -2,7 +2,7 @@ package volume import ( // TODO return types need to be refactored into pkg - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // Backend is the methods that need to be implemented to provide diff --git a/api/server/router/volume/volume_routes.go b/api/server/router/volume/volume_routes.go index 882de3a60b..feef77cb57 100644 --- a/api/server/router/volume/volume_routes.go +++ b/api/server/router/volume/volume_routes.go @@ -5,7 +5,7 @@ import ( "net/http" "github.com/docker/docker/api/server/httputils" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" "golang.org/x/net/context" ) diff --git a/api/types/filters/parse_test.go b/api/types/filters/parse_test.go deleted file mode 100644 index 4d5c814551..0000000000 --- a/api/types/filters/parse_test.go +++ /dev/null @@ -1,369 +0,0 @@ -package filters - -import ( - "fmt" - "testing" -) - -func TestParseArgs(t *testing.T) { - // equivalent of `docker ps -f 'created=today' -f 'image.name=ubuntu*' -f 'image.name=*untu'` - flagArgs := []string{ - "created=today", - "image.name=ubuntu*", - "image.name=*untu", - } - var ( - args = NewArgs() - err error - ) - for i := range flagArgs { - args, err = ParseFlag(flagArgs[i], args) - if err != nil { - t.Errorf("failed to parse %s: %s", flagArgs[i], err) - } - } - if len(args.Get("created")) != 1 { - t.Errorf("failed to set this arg") - } - if len(args.Get("image.name")) != 2 { - t.Errorf("the args should have collapsed") - } -} - -func TestParseArgsEdgeCase(t *testing.T) { - var filters Args - args, err := ParseFlag("", filters) - if err != nil { - t.Fatal(err) - } - if args.Len() != 0 { - t.Fatalf("Expected an empty Args (map), got %v", args) - } - if args, err = ParseFlag("anything", args); err == nil || err != ErrBadFormat { - t.Fatalf("Expected ErrBadFormat, got %v", err) - } -} - -func TestToParam(t *testing.T) { - fields := map[string]map[string]bool{ - "created": {"today": true}, - "image.name": {"ubuntu*": true, "*untu": true}, - } - a := Args{fields: fields} - - _, err := ToParam(a) - if err != nil { - t.Errorf("failed to marshal the filters: %s", err) - } -} - -func TestFromParam(t *testing.T) { - invalids := []string{ - "anything", - "['a','list']", - "{'key': 'value'}", - `{"key": "value"}`, - } - valid := map[*Args][]string{ - &Args{fields: map[string]map[string]bool{"key": {"value": true}}}: { - `{"key": ["value"]}`, - `{"key": {"value": true}}`, - }, - &Args{fields: map[string]map[string]bool{"key": {"value1": true, "value2": true}}}: { - `{"key": ["value1", "value2"]}`, - `{"key": {"value1": true, "value2": true}}`, - }, - &Args{fields: map[string]map[string]bool{"key1": {"value1": true}, "key2": {"value2": true}}}: { - `{"key1": ["value1"], "key2": ["value2"]}`, - `{"key1": {"value1": true}, "key2": {"value2": true}}`, - }, - } - - for _, invalid := range invalids { - if _, err := FromParam(invalid); err == nil { - t.Fatalf("Expected an error with %v, got nothing", invalid) - } - } - - for expectedArgs, matchers := range valid { - for _, json := range matchers { - args, err := FromParam(json) - if err != nil { - t.Fatal(err) - } - if args.Len() != expectedArgs.Len() { - t.Fatalf("Expected %v, go %v", expectedArgs, args) - } - for key, expectedValues := range expectedArgs.fields { - values := args.Get(key) - - if len(values) != len(expectedValues) { - t.Fatalf("Expected %v, go %v", expectedArgs, args) - } - - for _, v := range values { - if !expectedValues[v] { - t.Fatalf("Expected %v, go %v", expectedArgs, args) - } - } - } - } - } -} - -func TestEmpty(t *testing.T) { - a := Args{} - v, err := ToParam(a) - if err != nil { - t.Errorf("failed to marshal the filters: %s", err) - } - v1, err := FromParam(v) - if err != nil { - t.Errorf("%s", err) - } - if a.Len() != v1.Len() { - t.Errorf("these should both be empty sets") - } -} - -func TestArgsMatchKVListEmptySources(t *testing.T) { - args := NewArgs() - if !args.MatchKVList("created", map[string]string{}) { - t.Fatalf("Expected true for (%v,created), got true", args) - } - - args = Args{map[string]map[string]bool{"created": {"today": true}}} - if args.MatchKVList("created", map[string]string{}) { - t.Fatalf("Expected false for (%v,created), got true", args) - } -} - -func TestArgsMatchKVList(t *testing.T) { - // Not empty sources - sources := map[string]string{ - "key1": "value1", - "key2": "value2", - "key3": "value3", - } - - matches := map[*Args]string{ - &Args{}: "field", - &Args{map[string]map[string]bool{ - "created": map[string]bool{"today": true}, - "labels": map[string]bool{"key1": true}}, - }: "labels", - &Args{map[string]map[string]bool{ - "created": map[string]bool{"today": true}, - "labels": map[string]bool{"key1=value1": true}}, - }: "labels", - } - - for args, field := range matches { - if args.MatchKVList(field, sources) != true { - t.Fatalf("Expected true for %v on %v, got false", sources, args) - } - } - - differs := map[*Args]string{ - &Args{map[string]map[string]bool{ - "created": map[string]bool{"today": true}}, - }: "created", - &Args{map[string]map[string]bool{ - "created": map[string]bool{"today": true}, - "labels": map[string]bool{"key4": true}}, - }: "labels", - &Args{map[string]map[string]bool{ - "created": map[string]bool{"today": true}, - "labels": map[string]bool{"key1=value3": true}}, - }: "labels", - } - - for args, field := range differs { - if args.MatchKVList(field, sources) != false { - t.Fatalf("Expected false for %v on %v, got true", sources, args) - } - } -} - -func TestArgsMatch(t *testing.T) { - source := "today" - - matches := map[*Args]string{ - &Args{}: "field", - &Args{map[string]map[string]bool{ - "created": map[string]bool{"today": true}}, - }: "today", - &Args{map[string]map[string]bool{ - "created": map[string]bool{"to*": true}}, - }: "created", - &Args{map[string]map[string]bool{ - "created": map[string]bool{"to(.*)": true}}, - }: "created", - &Args{map[string]map[string]bool{ - "created": map[string]bool{"tod": true}}, - }: "created", - &Args{map[string]map[string]bool{ - "created": map[string]bool{"anyting": true, "to*": true}}, - }: "created", - } - - for args, field := range matches { - if args.Match(field, source) != true { - t.Fatalf("Expected true for %v on %v, got false", source, args) - } - } - - differs := map[*Args]string{ - &Args{map[string]map[string]bool{ - "created": map[string]bool{"tomorrow": true}}, - }: "created", - &Args{map[string]map[string]bool{ - "created": map[string]bool{"to(day": true}}, - }: "created", - &Args{map[string]map[string]bool{ - "created": map[string]bool{"tom(.*)": true}}, - }: "created", - &Args{map[string]map[string]bool{ - "created": map[string]bool{"tom": true}}, - }: "created", - &Args{map[string]map[string]bool{ - "created": map[string]bool{"today1": true}, - "labels": map[string]bool{"today": true}}, - }: "created", - } - - for args, field := range differs { - if args.Match(field, source) != false { - t.Fatalf("Expected false for %v on %v, got true", source, args) - } - } -} - -func TestAdd(t *testing.T) { - f := NewArgs() - f.Add("status", "running") - v := f.fields["status"] - if len(v) != 1 || !v["running"] { - t.Fatalf("Expected to include a running status, got %v", v) - } - - f.Add("status", "paused") - if len(v) != 2 || !v["paused"] { - t.Fatalf("Expected to include a paused status, got %v", v) - } -} - -func TestDel(t *testing.T) { - f := NewArgs() - f.Add("status", "running") - f.Del("status", "running") - v := f.fields["status"] - if v["running"] { - t.Fatalf("Expected to not include a running status filter, got true") - } -} - -func TestLen(t *testing.T) { - f := NewArgs() - if f.Len() != 0 { - t.Fatalf("Expected to not include any field") - } - f.Add("status", "running") - if f.Len() != 1 { - t.Fatalf("Expected to include one field") - } -} - -func TestExactMatch(t *testing.T) { - f := NewArgs() - - if !f.ExactMatch("status", "running") { - t.Fatalf("Expected to match `running` when there are no filters, got false") - } - - f.Add("status", "running") - f.Add("status", "pause*") - - if !f.ExactMatch("status", "running") { - t.Fatalf("Expected to match `running` with one of the filters, got false") - } - - if f.ExactMatch("status", "paused") { - t.Fatalf("Expected to not match `paused` with one of the filters, got true") - } -} - -func TestInclude(t *testing.T) { - f := NewArgs() - if f.Include("status") { - t.Fatalf("Expected to not include a status key, got true") - } - f.Add("status", "running") - if !f.Include("status") { - t.Fatalf("Expected to include a status key, got false") - } -} - -func TestValidate(t *testing.T) { - f := NewArgs() - f.Add("status", "running") - - valid := map[string]bool{ - "status": true, - "dangling": true, - } - - if err := f.Validate(valid); err != nil { - t.Fatal(err) - } - - f.Add("bogus", "running") - if err := f.Validate(valid); err == nil { - t.Fatalf("Expected to return an error, got nil") - } -} - -func TestWalkValues(t *testing.T) { - f := NewArgs() - f.Add("status", "running") - f.Add("status", "paused") - - f.WalkValues("status", func(value string) error { - if value != "running" && value != "paused" { - t.Fatalf("Unexpected value %s", value) - } - return nil - }) - - err := f.WalkValues("status", func(value string) error { - return fmt.Errorf("return") - }) - if err == nil { - t.Fatalf("Expected to get an error, got nil") - } - - err = f.WalkValues("foo", func(value string) error { - return fmt.Errorf("return") - }) - if err != nil { - t.Fatalf("Expected to not iterate when the field doesn't exist, got %v", err) - } -} - -func TestFuzzyMatch(t *testing.T) { - f := NewArgs() - f.Add("container", "foo") - - cases := map[string]bool{ - "foo": true, - "foobar": true, - "barfoo": false, - "bar": false, - } - for source, match := range cases { - got := f.FuzzyMatch("container", source) - if got != match { - t.Fatalf("Expected %v, got %v: %s", match, got, source) - } - } -} diff --git a/api/types/strslice/strslice_test.go b/api/types/strslice/strslice_test.go deleted file mode 100644 index 50955c1be2..0000000000 --- a/api/types/strslice/strslice_test.go +++ /dev/null @@ -1,135 +0,0 @@ -package strslice - -import ( - "encoding/json" - "reflect" - "testing" -) - -func TestStrSliceMarshalJSON(t *testing.T) { - strss := map[*StrSlice]string{ - nil: "", - &StrSlice{}: "null", - &StrSlice{[]string{"/bin/sh", "-c", "echo"}}: `["/bin/sh","-c","echo"]`, - } - - for strs, expected := range strss { - data, err := strs.MarshalJSON() - if err != nil { - t.Fatal(err) - } - if string(data) != expected { - t.Fatalf("Expected %v, got %v", expected, string(data)) - } - } -} - -func TestStrSliceUnmarshalJSON(t *testing.T) { - parts := map[string][]string{ - "": {"default", "values"}, - "[]": {}, - `["/bin/sh","-c","echo"]`: {"/bin/sh", "-c", "echo"}, - } - for json, expectedParts := range parts { - strs := &StrSlice{ - []string{"default", "values"}, - } - if err := strs.UnmarshalJSON([]byte(json)); err != nil { - t.Fatal(err) - } - - actualParts := strs.Slice() - if len(actualParts) != len(expectedParts) { - t.Fatalf("Expected %v parts, got %v (%v)", len(expectedParts), len(actualParts), expectedParts) - } - for index, part := range actualParts { - if part != expectedParts[index] { - t.Fatalf("Expected %v, got %v", expectedParts, actualParts) - break - } - } - } -} - -func TestStrSliceUnmarshalString(t *testing.T) { - var e *StrSlice - echo, err := json.Marshal("echo") - if err != nil { - t.Fatal(err) - } - if err := json.Unmarshal(echo, &e); err != nil { - t.Fatal(err) - } - - slice := e.Slice() - if len(slice) != 1 { - t.Fatalf("expected 1 element after unmarshal: %q", slice) - } - - if slice[0] != "echo" { - t.Fatalf("expected `echo`, got: %q", slice[0]) - } -} - -func TestStrSliceUnmarshalSlice(t *testing.T) { - var e *StrSlice - echo, err := json.Marshal([]string{"echo"}) - if err != nil { - t.Fatal(err) - } - if err := json.Unmarshal(echo, &e); err != nil { - t.Fatal(err) - } - - slice := e.Slice() - if len(slice) != 1 { - t.Fatalf("expected 1 element after unmarshal: %q", slice) - } - - if slice[0] != "echo" { - t.Fatalf("expected `echo`, got: %q", slice[0]) - } -} - -func TestStrSliceToString(t *testing.T) { - slices := map[*StrSlice]string{ - New(""): "", - New("one"): "one", - New("one", "two"): "one two", - } - for s, expected := range slices { - toString := s.ToString() - if toString != expected { - t.Fatalf("Expected %v, got %v", expected, toString) - } - } -} - -func TestStrSliceLen(t *testing.T) { - var emptyStrSlice *StrSlice - slices := map[*StrSlice]int{ - New(""): 1, - New("one"): 1, - New("one", "two"): 2, - emptyStrSlice: 0, - } - for s, expected := range slices { - if s.Len() != expected { - t.Fatalf("Expected %d, got %d", s.Len(), expected) - } - } -} - -func TestStrSliceSlice(t *testing.T) { - var emptyStrSlice *StrSlice - slices := map[*StrSlice][]string{ - New("one"): {"one"}, - New("one", "two"): {"one", "two"}, - emptyStrSlice: nil, - } - for s, expected := range slices { - if !reflect.DeepEqual(s.Slice(), expected) { - t.Fatalf("Expected %v, got %v", s.Slice(), expected) - } - } -} diff --git a/api/types/time/timestamp_test.go b/api/types/time/timestamp_test.go deleted file mode 100644 index 19854d0ea3..0000000000 --- a/api/types/time/timestamp_test.go +++ /dev/null @@ -1,93 +0,0 @@ -package time - -import ( - "fmt" - "testing" - "time" -) - -func TestGetTimestamp(t *testing.T) { - now := time.Now() - cases := []struct { - in, expected string - expectedErr bool - }{ - // Partial RFC3339 strings get parsed with second precision - {"2006-01-02T15:04:05.999999999+07:00", "1136189045.999999999", false}, - {"2006-01-02T15:04:05.999999999Z", "1136214245.999999999", false}, - {"2006-01-02T15:04:05.999999999", "1136214245.999999999", false}, - {"2006-01-02T15:04:05Z", "1136214245.000000000", false}, - {"2006-01-02T15:04:05", "1136214245.000000000", false}, - {"2006-01-02T15:04:0Z", "", true}, - {"2006-01-02T15:04:0", "", true}, - {"2006-01-02T15:04Z", "1136214240.000000000", false}, - {"2006-01-02T15:04+00:00", "1136214240.000000000", false}, - {"2006-01-02T15:04-00:00", "1136214240.000000000", false}, - {"2006-01-02T15:04", "1136214240.000000000", false}, - {"2006-01-02T15:0Z", "", true}, - {"2006-01-02T15:0", "", true}, - {"2006-01-02T15Z", "1136214000.000000000", false}, - {"2006-01-02T15+00:00", "1136214000.000000000", false}, - {"2006-01-02T15-00:00", "1136214000.000000000", false}, - {"2006-01-02T15", "1136214000.000000000", false}, - {"2006-01-02T1Z", "1136163600.000000000", false}, - {"2006-01-02T1", "1136163600.000000000", false}, - {"2006-01-02TZ", "", true}, - {"2006-01-02T", "", true}, - {"2006-01-02+00:00", "1136160000.000000000", false}, - {"2006-01-02-00:00", "1136160000.000000000", false}, - {"2006-01-02-00:01", "1136160060.000000000", false}, - {"2006-01-02Z", "1136160000.000000000", false}, - {"2006-01-02", "1136160000.000000000", false}, - {"2015-05-13T20:39:09Z", "1431549549.000000000", false}, - - // unix timestamps returned as is - {"1136073600", "1136073600", false}, - {"1136073600.000000001", "1136073600.000000001", false}, - // Durations - {"1m", fmt.Sprintf("%d", now.Add(-1*time.Minute).Unix()), false}, - {"1.5h", fmt.Sprintf("%d", now.Add(-90*time.Minute).Unix()), false}, - {"1h30m", fmt.Sprintf("%d", now.Add(-90*time.Minute).Unix()), false}, - - // String fallback - {"invalid", "invalid", false}, - } - - for _, c := range cases { - o, err := GetTimestamp(c.in, now) - if o != c.expected || - (err == nil && c.expectedErr) || - (err != nil && !c.expectedErr) { - t.Errorf("wrong value for '%s'. expected:'%s' got:'%s' with error: `%s`", c.in, c.expected, o, err) - t.Fail() - } - } -} - -func TestParseTimestamps(t *testing.T) { - cases := []struct { - in string - def, expectedS, expectedN int64 - expectedErr bool - }{ - // unix timestamps - {"1136073600", 0, 1136073600, 0, false}, - {"1136073600.000000001", 0, 1136073600, 1, false}, - {"1136073600.0000000010", 0, 1136073600, 1, false}, - {"1136073600.00000001", 0, 1136073600, 10, false}, - {"foo.bar", 0, 0, 0, true}, - {"1136073600.bar", 0, 1136073600, 0, true}, - {"", -1, -1, 0, false}, - } - - for _, c := range cases { - s, n, err := ParseTimestamps(c.in, c.def) - if s != c.expectedS || - n != c.expectedN || - (err == nil && c.expectedErr) || - (err != nil && !c.expectedErr) { - t.Errorf("wrong values for input `%s` with default `%d` expected:'%d'seconds and `%d`nanosecond got:'%d'seconds and `%d`nanoseconds with error: `%s`", c.in, c.def, c.expectedS, c.expectedN, s, n, err) - t.Fail() - } - } -} diff --git a/api/types/versions/README.md b/api/types/versions/README.md deleted file mode 100644 index 76c516e6a3..0000000000 --- a/api/types/versions/README.md +++ /dev/null @@ -1,14 +0,0 @@ -## Legacy API type versions - -This package includes types for legacy API versions. The stable version of the API types live in `api/types/*.go`. - -Consider moving a type here when you need to keep backwards compatibility in the API. This legacy types are organized by the latest API version they appear in. For instance, types in the `v1p19` package are valid for API versions below or equal `1.19`. Types in the `v1p20` package are valid for the API version `1.20`, since the versions below that will use the legacy types in `v1p19`. - -### Package name conventions - -The package name convention is to use `v` as a prefix for the version number and `p`(patch) as a separator. We use this nomenclature due to a few restrictions in the Go package name convention: - -1. We cannot use `.` because it's interpreted by the language, think of `v1.20.CallFunction`. -2. We cannot use `_` because golint complains abount it. The code is actually valid, but it looks probably more weird: `v1_20.CallFunction`. - -For instance, if you want to modify a type that was available in the version `1.21` of the API but it will have different fields in the version `1.22`, you want to create a new package under `api/types/versions/v1p21`. diff --git a/builder/builder.go b/builder/builder.go index 90ab204f8e..0defa613dc 100644 --- a/builder/builder.go +++ b/builder/builder.go @@ -9,8 +9,8 @@ import ( "os" "time" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/container" ) // Context represents a file system tree. diff --git a/builder/dockerfile/builder.go b/builder/dockerfile/builder.go index 8951793bff..70d3db01df 100644 --- a/builder/dockerfile/builder.go +++ b/builder/dockerfile/builder.go @@ -10,11 +10,11 @@ import ( "sync" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" "github.com/docker/docker/builder" "github.com/docker/docker/builder/dockerfile/parser" "github.com/docker/docker/pkg/stringid" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/container" ) var validCommitCommands = map[string]bool{ diff --git a/builder/dockerfile/dispatchers.go b/builder/dockerfile/dispatchers.go index 53e6322bfb..ea674edc5c 100644 --- a/builder/dockerfile/dispatchers.go +++ b/builder/dockerfile/dispatchers.go @@ -18,13 +18,13 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/docker/api" - "github.com/docker/docker/api/types/container" - "github.com/docker/docker/api/types/strslice" "github.com/docker/docker/builder" derr "github.com/docker/docker/errors" "github.com/docker/docker/pkg/signal" "github.com/docker/docker/pkg/system" runconfigopts "github.com/docker/docker/runconfig/opts" + "github.com/docker/engine-api/types/container" + "github.com/docker/engine-api/types/strslice" "github.com/docker/go-connections/nat" ) diff --git a/builder/dockerfile/internals.go b/builder/dockerfile/internals.go index 24c9087eae..bf5880f093 100644 --- a/builder/dockerfile/internals.go +++ b/builder/dockerfile/internals.go @@ -20,9 +20,6 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/docker/api" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" - "github.com/docker/docker/api/types/strslice" "github.com/docker/docker/builder" "github.com/docker/docker/builder/dockerfile/parser" "github.com/docker/docker/pkg/archive" @@ -36,6 +33,9 @@ import ( "github.com/docker/docker/pkg/tarsum" "github.com/docker/docker/pkg/urlutil" "github.com/docker/docker/runconfig/opts" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/container" + "github.com/docker/engine-api/types/strslice" ) func (b *Builder) commit(id string, autoCmd *strslice.StrSlice, comment string) error { diff --git a/builder/image.go b/builder/image.go index 4de620fae6..2e545cfa9d 100644 --- a/builder/image.go +++ b/builder/image.go @@ -1,6 +1,6 @@ package builder -import "github.com/docker/docker/api/types/container" +import "github.com/docker/engine-api/types/container" // Image represents a Docker image used by the builder. type Image interface { diff --git a/cliconfig/config.go b/cliconfig/config.go index 7e657ecbd2..f5b2be8a40 100644 --- a/cliconfig/config.go +++ b/cliconfig/config.go @@ -10,8 +10,8 @@ import ( "path/filepath" "strings" - "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/homedir" + "github.com/docker/engine-api/types" ) const ( diff --git a/cliconfig/config_test.go b/cliconfig/config_test.go index 147f5adbd6..17f9fd673b 100644 --- a/cliconfig/config_test.go +++ b/cliconfig/config_test.go @@ -7,8 +7,8 @@ import ( "strings" "testing" - "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/homedir" + "github.com/docker/engine-api/types" ) func TestEmptyConfigDir(t *testing.T) { diff --git a/container/archive.go b/container/archive.go index a7dd87fb84..95b6828575 100644 --- a/container/archive.go +++ b/container/archive.go @@ -4,8 +4,8 @@ import ( "os" "path/filepath" - "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/archive" + "github.com/docker/engine-api/types" ) // ResolvePath resolves the given path in the container to a resource on the diff --git a/container/container.go b/container/container.go index a4ae82cf20..9974a70725 100644 --- a/container/container.go +++ b/container/container.go @@ -11,7 +11,6 @@ import ( "time" "github.com/Sirupsen/logrus" - containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/daemon/exec" "github.com/docker/docker/daemon/execdriver" "github.com/docker/docker/daemon/logger" @@ -25,6 +24,7 @@ import ( "github.com/docker/docker/pkg/symlink" "github.com/docker/docker/runconfig" "github.com/docker/docker/volume" + containertypes "github.com/docker/engine-api/types/container" "github.com/docker/go-connections/nat" "github.com/opencontainers/runc/libcontainer/label" ) diff --git a/container/container_unit_test.go b/container/container_unit_test.go index f14dc12e97..67b829f9f9 100644 --- a/container/container_unit_test.go +++ b/container/container_unit_test.go @@ -3,8 +3,8 @@ package container import ( "testing" - "github.com/docker/docker/api/types/container" "github.com/docker/docker/pkg/signal" + "github.com/docker/engine-api/types/container" ) func TestContainerStopSignal(t *testing.T) { diff --git a/container/container_unix.go b/container/container_unix.go index c9afcaa0c0..361c77c15b 100644 --- a/container/container_unix.go +++ b/container/container_unix.go @@ -13,8 +13,6 @@ import ( "syscall" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types/container" - "github.com/docker/docker/api/types/network" "github.com/docker/docker/daemon/execdriver" derr "github.com/docker/docker/errors" "github.com/docker/docker/pkg/chrootarchive" @@ -22,6 +20,8 @@ import ( "github.com/docker/docker/pkg/system" "github.com/docker/docker/utils" "github.com/docker/docker/volume" + "github.com/docker/engine-api/types/container" + "github.com/docker/engine-api/types/network" "github.com/docker/go-connections/nat" "github.com/docker/libnetwork" "github.com/docker/libnetwork/netlabel" diff --git a/container/container_windows.go b/container/container_windows.go index cd8134472f..af68086f8d 100644 --- a/container/container_windows.go +++ b/container/container_windows.go @@ -3,9 +3,9 @@ package container import ( - "github.com/docker/docker/api/types/container" "github.com/docker/docker/daemon/execdriver" "github.com/docker/docker/volume" + "github.com/docker/engine-api/types/container" ) // Container holds fields specific to the Windows implementation. See diff --git a/container/monitor.go b/container/monitor.go index 8098f23bae..c866542118 100644 --- a/container/monitor.go +++ b/container/monitor.go @@ -9,12 +9,12 @@ import ( "time" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types/container" "github.com/docker/docker/daemon/execdriver" derr "github.com/docker/docker/errors" "github.com/docker/docker/pkg/promise" "github.com/docker/docker/pkg/stringid" "github.com/docker/docker/utils" + "github.com/docker/engine-api/types/container" ) const ( diff --git a/daemon/archive.go b/daemon/archive.go index 1c3cec0e9d..4ac667d261 100644 --- a/daemon/archive.go +++ b/daemon/archive.go @@ -7,11 +7,11 @@ import ( "path/filepath" "strings" - "github.com/docker/docker/api/types" "github.com/docker/docker/container" "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/chrootarchive" "github.com/docker/docker/pkg/ioutils" + "github.com/docker/engine-api/types" ) // ErrExtractPointNotDirectory is used to convey that the operation to extract diff --git a/daemon/commit.go b/daemon/commit.go index d8495ac65e..d0c4924e8e 100644 --- a/daemon/commit.go +++ b/daemon/commit.go @@ -7,8 +7,6 @@ import ( "strings" "time" - "github.com/docker/docker/api/types" - containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/container" "github.com/docker/docker/dockerversion" "github.com/docker/docker/image" @@ -16,6 +14,8 @@ import ( "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/ioutils" "github.com/docker/docker/reference" + "github.com/docker/engine-api/types" + containertypes "github.com/docker/engine-api/types/container" "github.com/docker/go-connections/nat" ) diff --git a/daemon/config.go b/daemon/config.go index b6477a6f33..8e46713bc9 100644 --- a/daemon/config.go +++ b/daemon/config.go @@ -1,9 +1,9 @@ package daemon import ( - "github.com/docker/docker/api/types/container" "github.com/docker/docker/opts" flag "github.com/docker/docker/pkg/mflag" + "github.com/docker/engine-api/types/container" ) const ( diff --git a/daemon/container_operations_unix.go b/daemon/container_operations_unix.go index fceb2da42c..6820d4b155 100644 --- a/daemon/container_operations_unix.go +++ b/daemon/container_operations_unix.go @@ -13,8 +13,6 @@ import ( "time" "github.com/Sirupsen/logrus" - containertypes "github.com/docker/docker/api/types/container" - networktypes "github.com/docker/docker/api/types/network" "github.com/docker/docker/container" "github.com/docker/docker/daemon/execdriver" "github.com/docker/docker/daemon/links" @@ -25,6 +23,8 @@ import ( "github.com/docker/docker/pkg/mount" "github.com/docker/docker/pkg/stringid" "github.com/docker/docker/runconfig" + containertypes "github.com/docker/engine-api/types/container" + networktypes "github.com/docker/engine-api/types/network" "github.com/docker/go-units" "github.com/docker/libnetwork" "github.com/docker/libnetwork/netlabel" diff --git a/daemon/create.go b/daemon/create.go index 7456a99797..12e9449320 100644 --- a/daemon/create.go +++ b/daemon/create.go @@ -2,8 +2,6 @@ package daemon import ( "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types" - containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/container" derr "github.com/docker/docker/errors" "github.com/docker/docker/image" @@ -11,6 +9,8 @@ import ( "github.com/docker/docker/pkg/idtools" "github.com/docker/docker/pkg/stringid" volumestore "github.com/docker/docker/volume/store" + "github.com/docker/engine-api/types" + containertypes "github.com/docker/engine-api/types/container" "github.com/opencontainers/runc/libcontainer/label" ) diff --git a/daemon/create_unix.go b/daemon/create_unix.go index 865400cacc..0f2f4d0270 100644 --- a/daemon/create_unix.go +++ b/daemon/create_unix.go @@ -6,12 +6,12 @@ import ( "os" "path/filepath" - containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/container" derr "github.com/docker/docker/errors" "github.com/docker/docker/image" "github.com/docker/docker/pkg/stringid" "github.com/docker/docker/volume" + containertypes "github.com/docker/engine-api/types/container" "github.com/opencontainers/runc/libcontainer/label" ) diff --git a/daemon/create_windows.go b/daemon/create_windows.go index 6e6ec9c12e..54b0ab6ab7 100644 --- a/daemon/create_windows.go +++ b/daemon/create_windows.go @@ -3,11 +3,11 @@ package daemon import ( "fmt" - containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/container" "github.com/docker/docker/image" "github.com/docker/docker/pkg/stringid" "github.com/docker/docker/volume" + containertypes "github.com/docker/engine-api/types/container" ) // createContainerPlatformSpecificSettings performs platform specific container create functionality diff --git a/daemon/daemon.go b/daemon/daemon.go index 849a97b9df..b23543a52a 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -22,17 +22,17 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/distribution/digest" "github.com/docker/docker/api" - "github.com/docker/docker/api/types" - containertypes "github.com/docker/docker/api/types/container" - eventtypes "github.com/docker/docker/api/types/events" - "github.com/docker/docker/api/types/filters" - registrytypes "github.com/docker/docker/api/types/registry" - "github.com/docker/docker/api/types/strslice" "github.com/docker/docker/container" "github.com/docker/docker/daemon/events" "github.com/docker/docker/daemon/exec" "github.com/docker/docker/daemon/execdriver" "github.com/docker/docker/daemon/execdriver/execdrivers" + "github.com/docker/engine-api/types" + containertypes "github.com/docker/engine-api/types/container" + eventtypes "github.com/docker/engine-api/types/events" + "github.com/docker/engine-api/types/filters" + registrytypes "github.com/docker/engine-api/types/registry" + "github.com/docker/engine-api/types/strslice" // register graph drivers _ "github.com/docker/docker/daemon/graphdriver/register" "github.com/docker/docker/daemon/logger" diff --git a/daemon/daemon_experimental.go b/daemon/daemon_experimental.go index 9ff05271a1..cc3852c853 100644 --- a/daemon/daemon_experimental.go +++ b/daemon/daemon_experimental.go @@ -9,8 +9,8 @@ import ( "runtime" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types/container" "github.com/docker/docker/pkg/idtools" + "github.com/docker/engine-api/types/container" ) func setupRemappedRoot(config *Config) ([]idtools.IDMap, []idtools.IDMap, error) { diff --git a/daemon/daemon_stub.go b/daemon/daemon_stub.go index 20b2263071..d60f063847 100644 --- a/daemon/daemon_stub.go +++ b/daemon/daemon_stub.go @@ -5,9 +5,9 @@ package daemon import ( "os" - "github.com/docker/docker/api/types/container" "github.com/docker/docker/pkg/idtools" "github.com/docker/docker/pkg/system" + "github.com/docker/engine-api/types/container" ) func setupRemappedRoot(config *Config) ([]idtools.IDMap, []idtools.IDMap, error) { diff --git a/daemon/daemon_test.go b/daemon/daemon_test.go index a46712b47a..0d927f76ae 100644 --- a/daemon/daemon_test.go +++ b/daemon/daemon_test.go @@ -7,7 +7,6 @@ import ( "path/filepath" "testing" - containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/container" "github.com/docker/docker/pkg/graphdb" "github.com/docker/docker/pkg/truncindex" @@ -15,6 +14,7 @@ import ( volumedrivers "github.com/docker/docker/volume/drivers" "github.com/docker/docker/volume/local" "github.com/docker/docker/volume/store" + containertypes "github.com/docker/engine-api/types/container" "github.com/docker/go-connections/nat" ) diff --git a/daemon/daemon_unix.go b/daemon/daemon_unix.go index 5186b29107..78ca7595ac 100644 --- a/daemon/daemon_unix.go +++ b/daemon/daemon_unix.go @@ -12,8 +12,6 @@ import ( "syscall" "github.com/Sirupsen/logrus" - pblkiodev "github.com/docker/docker/api/types/blkiodev" - containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/container" derr "github.com/docker/docker/errors" "github.com/docker/docker/image" @@ -24,6 +22,8 @@ import ( "github.com/docker/docker/reference" "github.com/docker/docker/runconfig" runconfigopts "github.com/docker/docker/runconfig/opts" + pblkiodev "github.com/docker/engine-api/types/blkiodev" + containertypes "github.com/docker/engine-api/types/container" "github.com/docker/libnetwork" nwconfig "github.com/docker/libnetwork/config" "github.com/docker/libnetwork/drivers/bridge" diff --git a/daemon/daemon_unix_test.go b/daemon/daemon_unix_test.go index 083b2bd45b..8a99b4b884 100644 --- a/daemon/daemon_unix_test.go +++ b/daemon/daemon_unix_test.go @@ -7,7 +7,7 @@ import ( "os" "testing" - "github.com/docker/docker/api/types/container" + "github.com/docker/engine-api/types/container" ) func TestAdjustCPUShares(t *testing.T) { diff --git a/daemon/daemon_windows.go b/daemon/daemon_windows.go index a85f14c7e4..1e36892e01 100644 --- a/daemon/daemon_windows.go +++ b/daemon/daemon_windows.go @@ -9,13 +9,13 @@ import ( "strings" "github.com/Sirupsen/logrus" - containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/container" "github.com/docker/docker/daemon/graphdriver" "github.com/docker/docker/dockerversion" "github.com/docker/docker/image" "github.com/docker/docker/layer" "github.com/docker/docker/reference" + containertypes "github.com/docker/engine-api/types/container" // register the windows graph driver "github.com/docker/docker/daemon/graphdriver/windows" "github.com/docker/docker/pkg/system" diff --git a/daemon/daemonbuilder/builder.go b/daemon/daemonbuilder/builder.go index e286508604..fba6039091 100644 --- a/daemon/daemonbuilder/builder.go +++ b/daemon/daemonbuilder/builder.go @@ -10,8 +10,6 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/docker/api" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" "github.com/docker/docker/builder" "github.com/docker/docker/daemon" "github.com/docker/docker/image" @@ -22,6 +20,8 @@ import ( "github.com/docker/docker/pkg/urlutil" "github.com/docker/docker/reference" "github.com/docker/docker/registry" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/container" ) // Docker implements builder.Backend for the docker Daemon object. diff --git a/daemon/daemonbuilder/image.go b/daemon/daemonbuilder/image.go index 34dbe3007c..0683a08275 100644 --- a/daemon/daemonbuilder/image.go +++ b/daemon/daemonbuilder/image.go @@ -1,8 +1,8 @@ package daemonbuilder import ( - "github.com/docker/docker/api/types/container" "github.com/docker/docker/image" + "github.com/docker/engine-api/types/container" ) type imgWrap struct { diff --git a/daemon/delete.go b/daemon/delete.go index c513cd8ddd..af9903f508 100644 --- a/daemon/delete.go +++ b/daemon/delete.go @@ -5,11 +5,11 @@ import ( "path" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types" "github.com/docker/docker/container" derr "github.com/docker/docker/errors" "github.com/docker/docker/layer" volumestore "github.com/docker/docker/volume/store" + "github.com/docker/engine-api/types" ) // ContainerRm removes the container id from the filesystem. An error diff --git a/daemon/delete_test.go b/daemon/delete_test.go index 487bb5d4e3..e0e6466a9c 100644 --- a/daemon/delete_test.go +++ b/daemon/delete_test.go @@ -5,9 +5,9 @@ import ( "os" "testing" - "github.com/docker/docker/api/types" - containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/container" + "github.com/docker/engine-api/types" + containertypes "github.com/docker/engine-api/types/container" ) func TestContainerDoubleDelete(t *testing.T) { diff --git a/daemon/events.go b/daemon/events.go index 3211679c10..825ce8a0d1 100644 --- a/daemon/events.go +++ b/daemon/events.go @@ -3,8 +3,8 @@ package daemon import ( "strings" - "github.com/docker/docker/api/types/events" "github.com/docker/docker/container" + "github.com/docker/engine-api/types/events" "github.com/docker/libnetwork" ) diff --git a/daemon/events/events.go b/daemon/events/events.go index 6f44e7c500..a8cd66fd99 100644 --- a/daemon/events/events.go +++ b/daemon/events/events.go @@ -4,8 +4,8 @@ import ( "sync" "time" - eventtypes "github.com/docker/docker/api/types/events" "github.com/docker/docker/pkg/pubsub" + eventtypes "github.com/docker/engine-api/types/events" ) const ( diff --git a/daemon/events/events_test.go b/daemon/events/events_test.go index a782636370..fc3b84bb85 100644 --- a/daemon/events/events_test.go +++ b/daemon/events/events_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/docker/docker/api/types/events" + "github.com/docker/engine-api/types/events" ) func TestEventsLog(t *testing.T) { diff --git a/daemon/events/filter.go b/daemon/events/filter.go index fc4fa7aae1..8936e371d2 100644 --- a/daemon/events/filter.go +++ b/daemon/events/filter.go @@ -1,9 +1,9 @@ package events import ( - "github.com/docker/docker/api/types/events" - "github.com/docker/docker/api/types/filters" "github.com/docker/docker/reference" + "github.com/docker/engine-api/types/events" + "github.com/docker/engine-api/types/filters" ) // Filter can filter out docker events from a stream diff --git a/daemon/events_test.go b/daemon/events_test.go index 7035ebd06b..acc285ed60 100644 --- a/daemon/events_test.go +++ b/daemon/events_test.go @@ -3,9 +3,9 @@ package daemon import ( "testing" - containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/container" "github.com/docker/docker/daemon/events" + containertypes "github.com/docker/engine-api/types/container" ) func TestLogContainerCopyLabels(t *testing.T) { diff --git a/daemon/exec.go b/daemon/exec.go index fb40941821..464dd5db66 100644 --- a/daemon/exec.go +++ b/daemon/exec.go @@ -6,8 +6,6 @@ import ( "time" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/strslice" "github.com/docker/docker/container" "github.com/docker/docker/daemon/exec" "github.com/docker/docker/daemon/execdriver" @@ -15,6 +13,8 @@ import ( "github.com/docker/docker/pkg/pools" "github.com/docker/docker/pkg/promise" "github.com/docker/docker/pkg/term" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/strslice" ) func (d *Daemon) registerExecCommand(container *container.Container, config *exec.Config) { diff --git a/daemon/exec_unix.go b/daemon/exec_unix.go index 40bd2c8ab8..754f73138a 100644 --- a/daemon/exec_unix.go +++ b/daemon/exec_unix.go @@ -3,9 +3,9 @@ package daemon import ( - "github.com/docker/docker/api/types" "github.com/docker/docker/container" "github.com/docker/docker/daemon/execdriver" + "github.com/docker/engine-api/types" ) // setPlatformSpecificExecProcessConfig sets platform-specific fields in the diff --git a/daemon/exec_windows.go b/daemon/exec_windows.go index f1b93bf02a..09efa82a2e 100644 --- a/daemon/exec_windows.go +++ b/daemon/exec_windows.go @@ -1,9 +1,9 @@ package daemon import ( - "github.com/docker/docker/api/types" "github.com/docker/docker/container" "github.com/docker/docker/daemon/execdriver" + "github.com/docker/engine-api/types" ) // setPlatformSpecificExecProcessConfig sets platform-specific fields in the diff --git a/daemon/execdriver/windows/info.go b/daemon/execdriver/windows/info.go index 5a92f5d6dc..5e26e879c4 100644 --- a/daemon/execdriver/windows/info.go +++ b/daemon/execdriver/windows/info.go @@ -3,8 +3,8 @@ package windows import ( - "github.com/docker/docker/api/types/container" "github.com/docker/docker/daemon/execdriver" + "github.com/docker/engine-api/types/container" ) type info struct { diff --git a/daemon/execdriver/windows/windows.go b/daemon/execdriver/windows/windows.go index 810f452ed5..03949ad5a6 100644 --- a/daemon/execdriver/windows/windows.go +++ b/daemon/execdriver/windows/windows.go @@ -8,10 +8,10 @@ import ( "sync" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types/container" "github.com/docker/docker/daemon/execdriver" "github.com/docker/docker/dockerversion" "github.com/docker/docker/pkg/parsers" + "github.com/docker/engine-api/types/container" ) // This is a daemon development variable only and should not be diff --git a/daemon/image_delete.go b/daemon/image_delete.go index b2aacfb606..5de9f55859 100644 --- a/daemon/image_delete.go +++ b/daemon/image_delete.go @@ -4,12 +4,12 @@ import ( "fmt" "strings" - "github.com/docker/docker/api/types" "github.com/docker/docker/container" derr "github.com/docker/docker/errors" "github.com/docker/docker/image" "github.com/docker/docker/pkg/stringid" "github.com/docker/docker/reference" + "github.com/docker/engine-api/types" ) // ImageDelete deletes the image referenced by the given imageRef from this diff --git a/daemon/images.go b/daemon/images.go index a5ed6b18f3..2b2a994b1e 100644 --- a/daemon/images.go +++ b/daemon/images.go @@ -5,11 +5,11 @@ import ( "path" "sort" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/filters" "github.com/docker/docker/image" "github.com/docker/docker/layer" "github.com/docker/docker/reference" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/filters" ) var acceptedImageFilterTags = map[string]bool{ diff --git a/daemon/import.go b/daemon/import.go index 80d2146c23..c04e8a38f2 100644 --- a/daemon/import.go +++ b/daemon/import.go @@ -8,7 +8,6 @@ import ( "runtime" "time" - "github.com/docker/docker/api/types/container" "github.com/docker/docker/dockerversion" "github.com/docker/docker/image" "github.com/docker/docker/layer" @@ -16,6 +15,7 @@ import ( "github.com/docker/docker/pkg/progress" "github.com/docker/docker/pkg/streamformatter" "github.com/docker/docker/reference" + "github.com/docker/engine-api/types/container" ) // ImportImage imports an image, getting the archived layer data either from diff --git a/daemon/info.go b/daemon/info.go index 83fe68fcb9..d060a14fdf 100644 --- a/daemon/info.go +++ b/daemon/info.go @@ -7,7 +7,6 @@ import ( "time" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types" "github.com/docker/docker/dockerversion" "github.com/docker/docker/pkg/fileutils" "github.com/docker/docker/pkg/parsers/kernel" @@ -18,6 +17,7 @@ import ( "github.com/docker/docker/registry" "github.com/docker/docker/utils" "github.com/docker/docker/volume/drivers" + "github.com/docker/engine-api/types" ) // SystemInfo returns information about the host server the daemon is running on. diff --git a/daemon/inspect.go b/daemon/inspect.go index b1e4eb43a7..098d43df5d 100644 --- a/daemon/inspect.go +++ b/daemon/inspect.go @@ -4,13 +4,13 @@ import ( "fmt" "time" - "github.com/docker/docker/api/types" - networktypes "github.com/docker/docker/api/types/network" - "github.com/docker/docker/api/types/versions/v1p20" "github.com/docker/docker/container" "github.com/docker/docker/daemon/exec" "github.com/docker/docker/daemon/network" "github.com/docker/docker/pkg/version" + "github.com/docker/engine-api/types" + networktypes "github.com/docker/engine-api/types/network" + "github.com/docker/engine-api/types/versions/v1p20" ) // ContainerInspect returns low-level information about a diff --git a/daemon/inspect_unix.go b/daemon/inspect_unix.go index 27aad9057c..b9321f34c3 100644 --- a/daemon/inspect_unix.go +++ b/daemon/inspect_unix.go @@ -3,9 +3,9 @@ package daemon import ( - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/versions/v1p19" "github.com/docker/docker/container" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/versions/v1p19" ) // This sets platform-specific fields diff --git a/daemon/inspect_windows.go b/daemon/inspect_windows.go index 330bc901dc..e42a61dadc 100644 --- a/daemon/inspect_windows.go +++ b/daemon/inspect_windows.go @@ -1,8 +1,8 @@ package daemon import ( - "github.com/docker/docker/api/types" "github.com/docker/docker/container" + "github.com/docker/engine-api/types" ) // This sets platform-specific fields diff --git a/daemon/list.go b/daemon/list.go index 2e9ff83310..c5765e387a 100644 --- a/daemon/list.go +++ b/daemon/list.go @@ -7,11 +7,11 @@ import ( "strings" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/filters" "github.com/docker/docker/container" "github.com/docker/docker/image" "github.com/docker/docker/pkg/graphdb" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/filters" "github.com/docker/go-connections/nat" ) diff --git a/daemon/network.go b/daemon/network.go index a3282517de..4dba9a80e1 100644 --- a/daemon/network.go +++ b/daemon/network.go @@ -6,9 +6,9 @@ import ( "net" "strings" - "github.com/docker/docker/api/types/network" derr "github.com/docker/docker/errors" "github.com/docker/docker/runconfig" + "github.com/docker/engine-api/types/network" "github.com/docker/libnetwork" ) diff --git a/daemon/network/settings.go b/daemon/network/settings.go index 1bf4b5a672..823bec2696 100644 --- a/daemon/network/settings.go +++ b/daemon/network/settings.go @@ -1,7 +1,7 @@ package network import ( - networktypes "github.com/docker/docker/api/types/network" + networktypes "github.com/docker/engine-api/types/network" "github.com/docker/go-connections/nat" ) diff --git a/daemon/start.go b/daemon/start.go index 54cb94884f..43734fc317 100644 --- a/daemon/start.go +++ b/daemon/start.go @@ -4,10 +4,10 @@ import ( "runtime" "github.com/Sirupsen/logrus" - containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/container" derr "github.com/docker/docker/errors" "github.com/docker/docker/runconfig" + containertypes "github.com/docker/engine-api/types/container" ) // ContainerStart starts a container. diff --git a/daemon/stats.go b/daemon/stats.go index e2b2420ca4..9812dce575 100644 --- a/daemon/stats.go +++ b/daemon/stats.go @@ -4,10 +4,10 @@ import ( "encoding/json" "io" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/versions/v1p20" "github.com/docker/docker/daemon/execdriver" "github.com/docker/docker/pkg/version" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/versions/v1p20" ) // ContainerStatsConfig holds information for configuring the runtime diff --git a/daemon/stats_freebsd.go b/daemon/stats_freebsd.go index 1898ca9d40..44c330aab6 100644 --- a/daemon/stats_freebsd.go +++ b/daemon/stats_freebsd.go @@ -1,7 +1,7 @@ package daemon import ( - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" "github.com/opencontainers/runc/libcontainer" ) diff --git a/daemon/stats_linux.go b/daemon/stats_linux.go index 466f2df5e7..201552a4e1 100644 --- a/daemon/stats_linux.go +++ b/daemon/stats_linux.go @@ -1,7 +1,7 @@ package daemon import ( - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" "github.com/opencontainers/runc/libcontainer" "github.com/opencontainers/runc/libcontainer/cgroups" ) diff --git a/daemon/stats_windows.go b/daemon/stats_windows.go index fc8991ba2a..0f47cf09e0 100644 --- a/daemon/stats_windows.go +++ b/daemon/stats_windows.go @@ -1,7 +1,7 @@ package daemon import ( - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" "github.com/opencontainers/runc/libcontainer" ) diff --git a/daemon/top_unix.go b/daemon/top_unix.go index 7bee57af2e..22dac6f218 100644 --- a/daemon/top_unix.go +++ b/daemon/top_unix.go @@ -7,8 +7,8 @@ import ( "strconv" "strings" - "github.com/docker/docker/api/types" derr "github.com/docker/docker/errors" + "github.com/docker/engine-api/types" ) // ContainerTop lists the processes running inside of the given diff --git a/daemon/top_windows.go b/daemon/top_windows.go index f224b2e2d2..dc4cace65d 100644 --- a/daemon/top_windows.go +++ b/daemon/top_windows.go @@ -1,8 +1,8 @@ package daemon import ( - "github.com/docker/docker/api/types" derr "github.com/docker/docker/errors" + "github.com/docker/engine-api/types" ) // ContainerTop is not supported on Windows and returns an error. diff --git a/daemon/update.go b/daemon/update.go index 5699901e75..6f07e92584 100644 --- a/daemon/update.go +++ b/daemon/update.go @@ -3,7 +3,7 @@ package daemon import ( "fmt" - "github.com/docker/docker/api/types/container" + "github.com/docker/engine-api/types/container" ) // ContainerUpdate updates resources of the container diff --git a/daemon/volumes.go b/daemon/volumes.go index df95af79aa..a7b648a56f 100644 --- a/daemon/volumes.go +++ b/daemon/volumes.go @@ -6,12 +6,12 @@ import ( "path/filepath" "strings" - "github.com/docker/docker/api/types" - containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/container" "github.com/docker/docker/daemon/execdriver" derr "github.com/docker/docker/errors" "github.com/docker/docker/volume" + "github.com/docker/engine-api/types" + containertypes "github.com/docker/engine-api/types/container" "github.com/opencontainers/runc/libcontainer/label" ) diff --git a/distribution/pull.go b/distribution/pull.go index cddc40e24e..db6e29d681 100644 --- a/distribution/pull.go +++ b/distribution/pull.go @@ -7,13 +7,13 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/docker/api" - "github.com/docker/docker/api/types" "github.com/docker/docker/distribution/metadata" "github.com/docker/docker/distribution/xfer" "github.com/docker/docker/image" "github.com/docker/docker/pkg/progress" "github.com/docker/docker/reference" "github.com/docker/docker/registry" + "github.com/docker/engine-api/types" "golang.org/x/net/context" ) diff --git a/distribution/push.go b/distribution/push.go index 9c49d40857..b4dec42952 100644 --- a/distribution/push.go +++ b/distribution/push.go @@ -8,7 +8,6 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/distribution/digest" - "github.com/docker/docker/api/types" "github.com/docker/docker/distribution/metadata" "github.com/docker/docker/distribution/xfer" "github.com/docker/docker/image" @@ -16,6 +15,7 @@ import ( "github.com/docker/docker/pkg/progress" "github.com/docker/docker/reference" "github.com/docker/docker/registry" + "github.com/docker/engine-api/types" "github.com/docker/libtrust" "golang.org/x/net/context" ) diff --git a/distribution/registry.go b/distribution/registry.go index 49346f0746..d39a44411f 100644 --- a/distribution/registry.go +++ b/distribution/registry.go @@ -16,10 +16,10 @@ import ( "github.com/docker/distribution/registry/client" "github.com/docker/distribution/registry/client/auth" "github.com/docker/distribution/registry/client/transport" - "github.com/docker/docker/api/types" "github.com/docker/docker/distribution/xfer" "github.com/docker/docker/reference" "github.com/docker/docker/registry" + "github.com/docker/engine-api/types" "golang.org/x/net/context" ) diff --git a/distribution/registry_unit_test.go b/distribution/registry_unit_test.go index 53bf6324a6..ac1019b3c9 100644 --- a/distribution/registry_unit_test.go +++ b/distribution/registry_unit_test.go @@ -8,11 +8,11 @@ import ( "testing" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types" - registrytypes "github.com/docker/docker/api/types/registry" "github.com/docker/docker/reference" "github.com/docker/docker/registry" "github.com/docker/docker/utils" + "github.com/docker/engine-api/types" + registrytypes "github.com/docker/engine-api/types/registry" "golang.org/x/net/context" ) diff --git a/hack/vendor.sh b/hack/vendor.sh index 9a4a612cdf..46045ef5a2 100755 --- a/hack/vendor.sh +++ b/hack/vendor.sh @@ -21,7 +21,8 @@ clone git github.com/tchap/go-patricia v2.1.0 clone git github.com/vdemeester/shakers 3c10293ce22b900c27acad7b28656196fcc2f73b clone git golang.org/x/net 47990a1ba55743e6ef1affd3a14e5bac8553615d https://github.com/golang/net.git clone git github.com/docker/go-units 651fc226e7441360384da338d0fd37f2440ffbe3 -clone git github.com/docker/go-connections 4e42727957c146776e5de9cec8c39e4059ed9f20 +clone git github.com/docker/go-connections v0.1.2 +clone git github.com/docker/engine-api v0.1.1 #get libnetwork packages clone git github.com/docker/libnetwork 9f0563ea8f430d8828553aac97161cbff4056436 diff --git a/image/image.go b/image/image.go index c0508c1b98..b33b0b8402 100644 --- a/image/image.go +++ b/image/image.go @@ -7,7 +7,7 @@ import ( "time" "github.com/docker/distribution/digest" - "github.com/docker/docker/api/types/container" + "github.com/docker/engine-api/types/container" ) // ID is the content-addressable ID of an image. diff --git a/integration-cli/docker_api_containers_test.go b/integration-cli/docker_api_containers_test.go index 6e1d288e61..568beca238 100644 --- a/integration-cli/docker_api_containers_test.go +++ b/integration-cli/docker_api_containers_test.go @@ -15,11 +15,11 @@ import ( "strings" "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/engine-api/types" + containertypes "github.com/docker/engine-api/types/container" "github.com/go-check/check" ) diff --git a/integration-cli/docker_api_images_test.go b/integration-cli/docker_api_images_test.go index 18625c5fb3..61298d3c68 100644 --- a/integration-cli/docker_api_images_test.go +++ b/integration-cli/docker_api_images_test.go @@ -6,8 +6,8 @@ import ( "net/url" "strings" - "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/integration/checker" + "github.com/docker/engine-api/types" "github.com/go-check/check" ) diff --git a/integration-cli/docker_api_inspect_test.go b/integration-cli/docker_api_inspect_test.go index 37172b039f..0e00638a21 100644 --- a/integration-cli/docker_api_inspect_test.go +++ b/integration-cli/docker_api_inspect_test.go @@ -5,10 +5,10 @@ import ( "net/http" "strings" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/versions/v1p20" "github.com/docker/docker/pkg/integration/checker" "github.com/docker/docker/pkg/stringutils" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/versions/v1p20" "github.com/go-check/check" ) diff --git a/integration-cli/docker_api_network_test.go b/integration-cli/docker_api_network_test.go index 5e4f2eb094..0552978387 100644 --- a/integration-cli/docker_api_network_test.go +++ b/integration-cli/docker_api_network_test.go @@ -8,10 +8,10 @@ import ( "net/url" "strings" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/filters" - "github.com/docker/docker/api/types/network" "github.com/docker/docker/pkg/integration/checker" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/filters" + "github.com/docker/engine-api/types/network" "github.com/go-check/check" ) diff --git a/integration-cli/docker_api_stats_test.go b/integration-cli/docker_api_stats_test.go index 715012f785..5041efbe21 100644 --- a/integration-cli/docker_api_stats_test.go +++ b/integration-cli/docker_api_stats_test.go @@ -10,9 +10,9 @@ import ( "strings" "time" - "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/integration/checker" "github.com/docker/docker/pkg/version" + "github.com/docker/engine-api/types" "github.com/go-check/check" ) diff --git a/integration-cli/docker_api_version_test.go b/integration-cli/docker_api_version_test.go index eb2de5904a..ccb1484190 100644 --- a/integration-cli/docker_api_version_test.go +++ b/integration-cli/docker_api_version_test.go @@ -4,9 +4,9 @@ import ( "encoding/json" "net/http" - "github.com/docker/docker/api/types" "github.com/docker/docker/dockerversion" "github.com/docker/docker/pkg/integration/checker" + "github.com/docker/engine-api/types" "github.com/go-check/check" ) diff --git a/integration-cli/docker_api_volumes_test.go b/integration-cli/docker_api_volumes_test.go index 68b3c2a2cb..eab19091ce 100644 --- a/integration-cli/docker_api_volumes_test.go +++ b/integration-cli/docker_api_volumes_test.go @@ -5,8 +5,8 @@ import ( "net/http" "path/filepath" - "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/integration/checker" + "github.com/docker/engine-api/types" "github.com/go-check/check" ) diff --git a/integration-cli/docker_cli_by_digest_test.go b/integration-cli/docker_cli_by_digest_test.go index 75c8b4fd6f..446a28eadf 100644 --- a/integration-cli/docker_cli_by_digest_test.go +++ b/integration-cli/docker_cli_by_digest_test.go @@ -10,9 +10,9 @@ import ( "github.com/docker/distribution/digest" "github.com/docker/distribution/manifest/schema1" - "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/integration/checker" "github.com/docker/docker/pkg/stringutils" + "github.com/docker/engine-api/types" "github.com/go-check/check" ) diff --git a/integration-cli/docker_cli_inspect_experimental_test.go b/integration-cli/docker_cli_inspect_experimental_test.go index c6e9c5c89f..9ba3df0eff 100644 --- a/integration-cli/docker_cli_inspect_experimental_test.go +++ b/integration-cli/docker_cli_inspect_experimental_test.go @@ -3,8 +3,8 @@ package main import ( - "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/integration/checker" + "github.com/docker/engine-api/types" "github.com/go-check/check" ) diff --git a/integration-cli/docker_cli_inspect_test.go b/integration-cli/docker_cli_inspect_test.go index 52c6ad3a73..986ed29821 100644 --- a/integration-cli/docker_cli_inspect_test.go +++ b/integration-cli/docker_cli_inspect_test.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" "github.com/docker/docker/pkg/integration/checker" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/container" "github.com/go-check/check" ) diff --git a/integration-cli/docker_cli_network_unix_test.go b/integration-cli/docker_cli_network_unix_test.go index 7a4a497cdf..9615642214 100644 --- a/integration-cli/docker_cli_network_unix_test.go +++ b/integration-cli/docker_cli_network_unix_test.go @@ -13,10 +13,10 @@ import ( "sort" "strings" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/versions/v1p20" "github.com/docker/docker/pkg/integration/checker" "github.com/docker/docker/runconfig" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/versions/v1p20" "github.com/docker/libnetwork/driverapi" remoteapi "github.com/docker/libnetwork/drivers/remote/api" "github.com/docker/libnetwork/ipamapi" diff --git a/integration-cli/docker_cli_update_unix_test.go b/integration-cli/docker_cli_update_unix_test.go index cb1cfee892..612efbe58b 100644 --- a/integration-cli/docker_cli_update_unix_test.go +++ b/integration-cli/docker_cli_update_unix_test.go @@ -7,8 +7,8 @@ import ( "fmt" "strings" - "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/integration/checker" + "github.com/docker/engine-api/types" "github.com/go-check/check" ) diff --git a/integration-cli/docker_utils.go b/integration-cli/docker_utils.go index 17611581e1..55bd1295c7 100644 --- a/integration-cli/docker_utils.go +++ b/integration-cli/docker_utils.go @@ -22,12 +22,12 @@ import ( "strings" "time" - "github.com/docker/docker/api/types" "github.com/docker/docker/opts" "github.com/docker/docker/pkg/httputils" "github.com/docker/docker/pkg/integration" "github.com/docker/docker/pkg/ioutils" "github.com/docker/docker/pkg/stringutils" + "github.com/docker/engine-api/types" "github.com/docker/go-connections/sockets" "github.com/docker/go-connections/tlsconfig" "github.com/go-check/check" diff --git a/registry/auth.go b/registry/auth.go index 34d5d6702b..7175598c71 100644 --- a/registry/auth.go +++ b/registry/auth.go @@ -8,8 +8,8 @@ import ( "strings" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types" - registrytypes "github.com/docker/docker/api/types/registry" + "github.com/docker/engine-api/types" + registrytypes "github.com/docker/engine-api/types/registry" ) // Login tries to register/login to the registry server. diff --git a/registry/auth_test.go b/registry/auth_test.go index ff1bd54715..caff8667d1 100644 --- a/registry/auth_test.go +++ b/registry/auth_test.go @@ -3,8 +3,8 @@ package registry import ( "testing" - "github.com/docker/docker/api/types" - registrytypes "github.com/docker/docker/api/types/registry" + "github.com/docker/engine-api/types" + registrytypes "github.com/docker/engine-api/types/registry" ) func buildAuthConfigs() map[string]types.AuthConfig { diff --git a/registry/config.go b/registry/config.go index 9708d03634..ec8ec271c9 100644 --- a/registry/config.go +++ b/registry/config.go @@ -7,10 +7,10 @@ import ( "net/url" "strings" - registrytypes "github.com/docker/docker/api/types/registry" "github.com/docker/docker/opts" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/reference" + registrytypes "github.com/docker/engine-api/types/registry" ) // Options holds command line options. diff --git a/registry/endpoint.go b/registry/endpoint.go index 43ac9053fb..258a9c2854 100644 --- a/registry/endpoint.go +++ b/registry/endpoint.go @@ -13,7 +13,7 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/distribution/registry/api/v2" "github.com/docker/distribution/registry/client/transport" - registrytypes "github.com/docker/docker/api/types/registry" + registrytypes "github.com/docker/engine-api/types/registry" ) // for mocking in unit tests diff --git a/registry/registry_mock_test.go b/registry/registry_mock_test.go index be04e34689..057afac10d 100644 --- a/registry/registry_mock_test.go +++ b/registry/registry_mock_test.go @@ -15,9 +15,9 @@ import ( "testing" "time" - registrytypes "github.com/docker/docker/api/types/registry" "github.com/docker/docker/opts" "github.com/docker/docker/reference" + registrytypes "github.com/docker/engine-api/types/registry" "github.com/gorilla/mux" "github.com/Sirupsen/logrus" diff --git a/registry/registry_test.go b/registry/registry_test.go index 46d2818fb7..7630d9a523 100644 --- a/registry/registry_test.go +++ b/registry/registry_test.go @@ -9,9 +9,9 @@ import ( "testing" "github.com/docker/distribution/registry/client/transport" - "github.com/docker/docker/api/types" - registrytypes "github.com/docker/docker/api/types/registry" "github.com/docker/docker/reference" + "github.com/docker/engine-api/types" + registrytypes "github.com/docker/engine-api/types/registry" ) var ( diff --git a/registry/service.go b/registry/service.go index 7223cbd8f3..dbdf173113 100644 --- a/registry/service.go +++ b/registry/service.go @@ -6,9 +6,9 @@ import ( "net/url" "strings" - "github.com/docker/docker/api/types" - registrytypes "github.com/docker/docker/api/types/registry" "github.com/docker/docker/reference" + "github.com/docker/engine-api/types" + registrytypes "github.com/docker/engine-api/types/registry" ) // Service is a registry service. It tracks configuration data such as a list diff --git a/registry/session.go b/registry/session.go index 494b84bf5a..57acbc0cf6 100644 --- a/registry/session.go +++ b/registry/session.go @@ -19,13 +19,13 @@ import ( "strings" "github.com/Sirupsen/logrus" - "github.com/docker/docker/api/types" - registrytypes "github.com/docker/docker/api/types/registry" "github.com/docker/docker/pkg/httputils" "github.com/docker/docker/pkg/ioutils" "github.com/docker/docker/pkg/stringid" "github.com/docker/docker/pkg/tarsum" "github.com/docker/docker/reference" + "github.com/docker/engine-api/types" + registrytypes "github.com/docker/engine-api/types/registry" ) var ( diff --git a/registry/types.go b/registry/types.go index da3eaacb3f..ee88276e4e 100644 --- a/registry/types.go +++ b/registry/types.go @@ -1,8 +1,8 @@ package registry import ( - registrytypes "github.com/docker/docker/api/types/registry" "github.com/docker/docker/reference" + registrytypes "github.com/docker/engine-api/types/registry" ) // RepositoryData tracks the image list, list of endpoints, and list of tokens diff --git a/runconfig/compare.go b/runconfig/compare.go index 81f16b0a35..e774ba2294 100644 --- a/runconfig/compare.go +++ b/runconfig/compare.go @@ -1,6 +1,6 @@ package runconfig -import "github.com/docker/docker/api/types/container" +import "github.com/docker/engine-api/types/container" // Compare two Config struct. Do not compare the "Image" nor "Hostname" fields // If OpenStdin is set, then it differs diff --git a/runconfig/compare_test.go b/runconfig/compare_test.go index ed7528d67b..e67f659ef9 100644 --- a/runconfig/compare_test.go +++ b/runconfig/compare_test.go @@ -3,8 +3,8 @@ package runconfig import ( "testing" - "github.com/docker/docker/api/types/container" - "github.com/docker/docker/api/types/strslice" + "github.com/docker/engine-api/types/container" + "github.com/docker/engine-api/types/strslice" "github.com/docker/go-connections/nat" ) diff --git a/runconfig/config.go b/runconfig/config.go index d12457393c..f40da2275a 100644 --- a/runconfig/config.go +++ b/runconfig/config.go @@ -5,8 +5,8 @@ import ( "fmt" "io" - "github.com/docker/docker/api/types/container" "github.com/docker/docker/volume" + "github.com/docker/engine-api/types/container" ) // DecodeContainerConfig decodes a json encoded config into a ContainerConfigWrapper diff --git a/runconfig/config_test.go b/runconfig/config_test.go index 7a1c785c2f..8c8cb15b00 100644 --- a/runconfig/config_test.go +++ b/runconfig/config_test.go @@ -9,8 +9,8 @@ import ( "strings" "testing" - "github.com/docker/docker/api/types/container" - "github.com/docker/docker/api/types/strslice" + "github.com/docker/engine-api/types/container" + "github.com/docker/engine-api/types/strslice" ) type f struct { diff --git a/runconfig/config_unix.go b/runconfig/config_unix.go index 05af155f5d..7bff0a2783 100644 --- a/runconfig/config_unix.go +++ b/runconfig/config_unix.go @@ -2,7 +2,7 @@ package runconfig -import "github.com/docker/docker/api/types/container" +import "github.com/docker/engine-api/types/container" // ContainerConfigWrapper is a Config wrapper that hold the container Config (portable) // and the corresponding HostConfig (non-portable). diff --git a/runconfig/config_windows.go b/runconfig/config_windows.go index 6ff7afcdaf..c8d387becd 100644 --- a/runconfig/config_windows.go +++ b/runconfig/config_windows.go @@ -1,6 +1,6 @@ package runconfig -import "github.com/docker/docker/api/types/container" +import "github.com/docker/engine-api/types/container" // ContainerConfigWrapper is a Config wrapper that hold the container Config (portable) // and the corresponding HostConfig (non-portable). diff --git a/runconfig/hostconfig.go b/runconfig/hostconfig.go index 2b81d02c20..769cc9f5da 100644 --- a/runconfig/hostconfig.go +++ b/runconfig/hostconfig.go @@ -4,7 +4,7 @@ import ( "encoding/json" "io" - "github.com/docker/docker/api/types/container" + "github.com/docker/engine-api/types/container" ) // DecodeHostConfig creates a HostConfig based on the specified Reader. diff --git a/runconfig/hostconfig_test.go b/runconfig/hostconfig_test.go index 941c16d6e8..ef82a7143f 100644 --- a/runconfig/hostconfig_test.go +++ b/runconfig/hostconfig_test.go @@ -8,7 +8,7 @@ import ( "io/ioutil" "testing" - "github.com/docker/docker/api/types/container" + "github.com/docker/engine-api/types/container" ) // TODO Windows: This will need addressing for a Windows daemon. diff --git a/runconfig/hostconfig_unix.go b/runconfig/hostconfig_unix.go index 4c28799395..7875d82e25 100644 --- a/runconfig/hostconfig_unix.go +++ b/runconfig/hostconfig_unix.go @@ -7,7 +7,7 @@ import ( "runtime" "strings" - "github.com/docker/docker/api/types/container" + "github.com/docker/engine-api/types/container" ) // DefaultDaemonNetworkMode returns the default network stack the daemon should diff --git a/runconfig/hostconfig_windows.go b/runconfig/hostconfig_windows.go index 3cade744ad..56aa171819 100644 --- a/runconfig/hostconfig_windows.go +++ b/runconfig/hostconfig_windows.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/docker/docker/api/types/container" + "github.com/docker/engine-api/types/container" ) // DefaultDaemonNetworkMode returns the default network stack the daemon should diff --git a/runconfig/opts/parse.go b/runconfig/opts/parse.go index ad3c0eeaab..6f7c7cde7e 100644 --- a/runconfig/opts/parse.go +++ b/runconfig/opts/parse.go @@ -6,12 +6,12 @@ import ( "strconv" "strings" - "github.com/docker/docker/api/types/container" - "github.com/docker/docker/api/types/strslice" "github.com/docker/docker/opts" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/pkg/mount" "github.com/docker/docker/pkg/signal" + "github.com/docker/engine-api/types/container" + "github.com/docker/engine-api/types/strslice" "github.com/docker/go-connections/nat" "github.com/docker/go-units" ) diff --git a/runconfig/opts/parse_test.go b/runconfig/opts/parse_test.go index 2c7e100ef9..58a853ac82 100644 --- a/runconfig/opts/parse_test.go +++ b/runconfig/opts/parse_test.go @@ -10,9 +10,9 @@ import ( "strings" "testing" - "github.com/docker/docker/api/types/container" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/runconfig" + "github.com/docker/engine-api/types/container" "github.com/docker/go-connections/nat" ) diff --git a/runconfig/opts/throttledevice.go b/runconfig/opts/throttledevice.go index 1f206b48f0..acb00ed5f7 100644 --- a/runconfig/opts/throttledevice.go +++ b/runconfig/opts/throttledevice.go @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "github.com/docker/docker/api/types/blkiodev" + "github.com/docker/engine-api/types/blkiodev" "github.com/docker/go-units" ) diff --git a/runconfig/opts/weightdevice.go b/runconfig/opts/weightdevice.go index 4d9aa93235..bd3c0b178a 100644 --- a/runconfig/opts/weightdevice.go +++ b/runconfig/opts/weightdevice.go @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "github.com/docker/docker/api/types/blkiodev" + "github.com/docker/engine-api/types/blkiodev" ) // ValidatorWeightFctType defines a validator function that returns a validated struct and/or an error. diff --git a/vendor/src/github.com/docker/engine-api/LICENSE b/vendor/src/github.com/docker/engine-api/LICENSE new file mode 100644 index 0000000000..c157bff96a --- /dev/null +++ b/vendor/src/github.com/docker/engine-api/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015-2016 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/api/client/lib/client.go b/vendor/src/github.com/docker/engine-api/client/client.go similarity index 99% rename from api/client/lib/client.go rename to vendor/src/github.com/docker/engine-api/client/client.go index d85a55e70f..061fd55daf 100644 --- a/api/client/lib/client.go +++ b/vendor/src/github.com/docker/engine-api/client/client.go @@ -1,4 +1,4 @@ -package lib +package client import ( "crypto/tls" diff --git a/api/client/lib/container_attach.go b/vendor/src/github.com/docker/engine-api/client/container_attach.go similarity index 94% rename from api/client/lib/container_attach.go rename to vendor/src/github.com/docker/engine-api/client/container_attach.go index aac4d65304..1a403c36e0 100644 --- a/api/client/lib/container_attach.go +++ b/vendor/src/github.com/docker/engine-api/client/container_attach.go @@ -1,9 +1,9 @@ -package lib +package client import ( "net/url" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ContainerAttach attaches a connection to a container in the server. diff --git a/api/client/lib/container_commit.go b/vendor/src/github.com/docker/engine-api/client/container_commit.go similarity index 94% rename from api/client/lib/container_commit.go rename to vendor/src/github.com/docker/engine-api/client/container_commit.go index 45cf166250..488d0876f7 100644 --- a/api/client/lib/container_commit.go +++ b/vendor/src/github.com/docker/engine-api/client/container_commit.go @@ -1,10 +1,10 @@ -package lib +package client import ( "encoding/json" "net/url" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ContainerCommit applies changes into a container and creates a new tagged image. diff --git a/api/client/lib/container_create.go b/vendor/src/github.com/docker/engine-api/client/container_create.go similarity index 92% rename from api/client/lib/container_create.go rename to vendor/src/github.com/docker/engine-api/client/container_create.go index e563d7b5a2..88a0520cea 100644 --- a/api/client/lib/container_create.go +++ b/vendor/src/github.com/docker/engine-api/client/container_create.go @@ -1,12 +1,12 @@ -package lib +package client import ( "encoding/json" "net/url" "strings" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/container" ) type configWrapper struct { diff --git a/api/client/lib/container_inspect.go b/vendor/src/github.com/docker/engine-api/client/container_inspect.go similarity index 97% rename from api/client/lib/container_inspect.go rename to vendor/src/github.com/docker/engine-api/client/container_inspect.go index 41e413132e..c18a764ef8 100644 --- a/api/client/lib/container_inspect.go +++ b/vendor/src/github.com/docker/engine-api/client/container_inspect.go @@ -1,4 +1,4 @@ -package lib +package client import ( "bytes" @@ -7,7 +7,7 @@ import ( "net/http" "net/url" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ContainerInspect returns the container information. diff --git a/api/client/lib/container_list.go b/vendor/src/github.com/docker/engine-api/client/container_list.go similarity index 90% rename from api/client/lib/container_list.go rename to vendor/src/github.com/docker/engine-api/client/container_list.go index 6ffe415856..b55307c84e 100644 --- a/api/client/lib/container_list.go +++ b/vendor/src/github.com/docker/engine-api/client/container_list.go @@ -1,12 +1,12 @@ -package lib +package client import ( "encoding/json" "net/url" "strconv" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/filters" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/filters" ) // ContainerList returns the list of containers in the docker host. diff --git a/api/client/lib/container_remove.go b/vendor/src/github.com/docker/engine-api/client/container_remove.go similarity index 89% rename from api/client/lib/container_remove.go rename to vendor/src/github.com/docker/engine-api/client/container_remove.go index aff5012b36..b078d4880b 100644 --- a/api/client/lib/container_remove.go +++ b/vendor/src/github.com/docker/engine-api/client/container_remove.go @@ -1,9 +1,9 @@ -package lib +package client import ( "net/url" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ContainerRemove kills and removes a container from the docker host. diff --git a/api/client/lib/container_rename.go b/vendor/src/github.com/docker/engine-api/client/container_rename.go similarity index 95% rename from api/client/lib/container_rename.go rename to vendor/src/github.com/docker/engine-api/client/container_rename.go index 1aed00ada1..9d8b08af0a 100644 --- a/api/client/lib/container_rename.go +++ b/vendor/src/github.com/docker/engine-api/client/container_rename.go @@ -1,4 +1,4 @@ -package lib +package client import "net/url" diff --git a/api/client/lib/container_restart.go b/vendor/src/github.com/docker/engine-api/client/container_restart.go similarity index 96% rename from api/client/lib/container_restart.go rename to vendor/src/github.com/docker/engine-api/client/container_restart.go index 74b5022b90..73da43cb36 100644 --- a/api/client/lib/container_restart.go +++ b/vendor/src/github.com/docker/engine-api/client/container_restart.go @@ -1,4 +1,4 @@ -package lib +package client import ( "net/url" diff --git a/api/client/lib/container_start.go b/vendor/src/github.com/docker/engine-api/client/container_start.go similarity index 94% rename from api/client/lib/container_start.go rename to vendor/src/github.com/docker/engine-api/client/container_start.go index 2c65b5df30..3751ce7e3e 100644 --- a/api/client/lib/container_start.go +++ b/vendor/src/github.com/docker/engine-api/client/container_start.go @@ -1,4 +1,4 @@ -package lib +package client // ContainerStart sends a request to the docker daemon to start a container. func (cli *Client) ContainerStart(containerID string) error { diff --git a/api/client/lib/container_stats.go b/vendor/src/github.com/docker/engine-api/client/container_stats.go similarity index 96% rename from api/client/lib/container_stats.go rename to vendor/src/github.com/docker/engine-api/client/container_stats.go index a18fae7a0b..486b8b0e7e 100644 --- a/api/client/lib/container_stats.go +++ b/vendor/src/github.com/docker/engine-api/client/container_stats.go @@ -1,4 +1,4 @@ -package lib +package client import ( "io" diff --git a/api/client/lib/container_stop.go b/vendor/src/github.com/docker/engine-api/client/container_stop.go similarity index 96% rename from api/client/lib/container_stop.go rename to vendor/src/github.com/docker/engine-api/client/container_stop.go index 3bb73ea75e..7f850efe9a 100644 --- a/api/client/lib/container_stop.go +++ b/vendor/src/github.com/docker/engine-api/client/container_stop.go @@ -1,4 +1,4 @@ -package lib +package client import ( "net/url" diff --git a/api/client/lib/container_top.go b/vendor/src/github.com/docker/engine-api/client/container_top.go similarity index 91% rename from api/client/lib/container_top.go rename to vendor/src/github.com/docker/engine-api/client/container_top.go index abee1ed417..04aecc278c 100644 --- a/api/client/lib/container_top.go +++ b/vendor/src/github.com/docker/engine-api/client/container_top.go @@ -1,11 +1,11 @@ -package lib +package client import ( "encoding/json" "net/url" "strings" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ContainerTop shows process information from within a container. diff --git a/api/client/lib/container_unpause.go b/vendor/src/github.com/docker/engine-api/client/container_unpause.go similarity index 94% rename from api/client/lib/container_unpause.go rename to vendor/src/github.com/docker/engine-api/client/container_unpause.go index 146cbd8fc4..cbaaed898a 100644 --- a/api/client/lib/container_unpause.go +++ b/vendor/src/github.com/docker/engine-api/client/container_unpause.go @@ -1,4 +1,4 @@ -package lib +package client // ContainerUnpause resumes the process execution within a container func (cli *Client) ContainerUnpause(containerID string) error { diff --git a/api/client/lib/container_update.go b/vendor/src/github.com/docker/engine-api/client/container_update.go similarity index 81% rename from api/client/lib/container_update.go rename to vendor/src/github.com/docker/engine-api/client/container_update.go index 387a6c475d..f58b8c3293 100644 --- a/api/client/lib/container_update.go +++ b/vendor/src/github.com/docker/engine-api/client/container_update.go @@ -1,7 +1,7 @@ -package lib +package client import ( - "github.com/docker/docker/api/types/container" + "github.com/docker/engine-api/types/container" ) // ContainerUpdate updates resources of a container diff --git a/api/client/lib/copy.go b/vendor/src/github.com/docker/engine-api/client/copy.go similarity index 98% rename from api/client/lib/copy.go rename to vendor/src/github.com/docker/engine-api/client/copy.go index e26a7f79b0..92cf384a07 100644 --- a/api/client/lib/copy.go +++ b/vendor/src/github.com/docker/engine-api/client/copy.go @@ -1,4 +1,4 @@ -package lib +package client import ( "encoding/base64" @@ -10,7 +10,7 @@ import ( "path/filepath" "strings" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ContainerStatPath returns Stat information about a path inside the container filesystem. diff --git a/api/client/lib/diff.go b/vendor/src/github.com/docker/engine-api/client/diff.go similarity index 91% rename from api/client/lib/diff.go rename to vendor/src/github.com/docker/engine-api/client/diff.go index 15954c5ed7..6639d8bb25 100644 --- a/api/client/lib/diff.go +++ b/vendor/src/github.com/docker/engine-api/client/diff.go @@ -1,10 +1,10 @@ -package lib +package client import ( "encoding/json" "net/url" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ContainerDiff shows differences in a container filesystem since it was started. diff --git a/api/client/lib/errors.go b/vendor/src/github.com/docker/engine-api/client/errors.go similarity index 99% rename from api/client/lib/errors.go rename to vendor/src/github.com/docker/engine-api/client/errors.go index 95b88075da..f1701f8e92 100644 --- a/api/client/lib/errors.go +++ b/vendor/src/github.com/docker/engine-api/client/errors.go @@ -1,4 +1,4 @@ -package lib +package client import ( "errors" diff --git a/api/client/lib/events.go b/vendor/src/github.com/docker/engine-api/client/events.go similarity index 85% rename from api/client/lib/events.go rename to vendor/src/github.com/docker/engine-api/client/events.go index 502e765208..41f2f37334 100644 --- a/api/client/lib/events.go +++ b/vendor/src/github.com/docker/engine-api/client/events.go @@ -1,13 +1,13 @@ -package lib +package client import ( "io" "net/url" "time" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/filters" - timetypes "github.com/docker/docker/api/types/time" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/filters" + timetypes "github.com/docker/engine-api/types/time" ) // Events returns a stream of events in the daemon in a ReadCloser. diff --git a/api/client/lib/exec.go b/vendor/src/github.com/docker/engine-api/client/exec.go similarity index 97% rename from api/client/lib/exec.go rename to vendor/src/github.com/docker/engine-api/client/exec.go index 8bcabb1657..3a86b4043f 100644 --- a/api/client/lib/exec.go +++ b/vendor/src/github.com/docker/engine-api/client/exec.go @@ -1,9 +1,9 @@ -package lib +package client import ( "encoding/json" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ContainerExecCreate creates a new exec configuration to run an exec process. diff --git a/api/client/lib/export.go b/vendor/src/github.com/docker/engine-api/client/export.go similarity index 96% rename from api/client/lib/export.go rename to vendor/src/github.com/docker/engine-api/client/export.go index 07893c5b83..2b67c21df2 100644 --- a/api/client/lib/export.go +++ b/vendor/src/github.com/docker/engine-api/client/export.go @@ -1,4 +1,4 @@ -package lib +package client import ( "io" diff --git a/api/client/lib/hijack.go b/vendor/src/github.com/docker/engine-api/client/hijack.go similarity index 98% rename from api/client/lib/hijack.go rename to vendor/src/github.com/docker/engine-api/client/hijack.go index 6c76f0a88e..5835d8c603 100644 --- a/api/client/lib/hijack.go +++ b/vendor/src/github.com/docker/engine-api/client/hijack.go @@ -1,4 +1,4 @@ -package lib +package client import ( "crypto/tls" @@ -10,7 +10,7 @@ import ( "strings" "time" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // tlsClientCon holds tls information and a dialed connection. diff --git a/api/client/lib/history.go b/vendor/src/github.com/docker/engine-api/client/history.go similarity index 90% rename from api/client/lib/history.go rename to vendor/src/github.com/docker/engine-api/client/history.go index e729f70eff..77697274ae 100644 --- a/api/client/lib/history.go +++ b/vendor/src/github.com/docker/engine-api/client/history.go @@ -1,10 +1,10 @@ -package lib +package client import ( "encoding/json" "net/url" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ImageHistory returns the changes in an image in history format. diff --git a/api/client/lib/image_build.go b/vendor/src/github.com/docker/engine-api/client/image_build.go similarity index 96% rename from api/client/lib/image_build.go rename to vendor/src/github.com/docker/engine-api/client/image_build.go index da4d6efc68..84e57fe68f 100644 --- a/api/client/lib/image_build.go +++ b/vendor/src/github.com/docker/engine-api/client/image_build.go @@ -1,4 +1,4 @@ -package lib +package client import ( "encoding/base64" @@ -9,8 +9,8 @@ import ( "strconv" "strings" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/container" ) var headerRegexp = regexp.MustCompile(`\ADocker/.+\s\((.+)\)\z`) diff --git a/api/client/lib/image_create.go b/vendor/src/github.com/docker/engine-api/client/image_create.go similarity index 92% rename from api/client/lib/image_create.go rename to vendor/src/github.com/docker/engine-api/client/image_create.go index 75d4b75e4a..bd319228c5 100644 --- a/api/client/lib/image_create.go +++ b/vendor/src/github.com/docker/engine-api/client/image_create.go @@ -1,10 +1,10 @@ -package lib +package client import ( "io" "net/url" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ImageCreate creates a new image based in the parent options. diff --git a/api/client/lib/image_import.go b/vendor/src/github.com/docker/engine-api/client/image_import.go similarity index 92% rename from api/client/lib/image_import.go rename to vendor/src/github.com/docker/engine-api/client/image_import.go index 873010f3e5..212a942a5f 100644 --- a/api/client/lib/image_import.go +++ b/vendor/src/github.com/docker/engine-api/client/image_import.go @@ -1,10 +1,10 @@ -package lib +package client import ( "io" "net/url" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ImageImport creates a new image based in the source options. diff --git a/api/client/lib/image_inspect.go b/vendor/src/github.com/docker/engine-api/client/image_inspect.go similarity index 94% rename from api/client/lib/image_inspect.go rename to vendor/src/github.com/docker/engine-api/client/image_inspect.go index f4089cba0b..9ef9fc36eb 100644 --- a/api/client/lib/image_inspect.go +++ b/vendor/src/github.com/docker/engine-api/client/image_inspect.go @@ -1,4 +1,4 @@ -package lib +package client import ( "bytes" @@ -7,7 +7,7 @@ import ( "net/http" "net/url" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ImageInspectWithRaw returns the image information and it's raw representation. diff --git a/api/client/lib/image_list.go b/vendor/src/github.com/docker/engine-api/client/image_list.go similarity index 89% rename from api/client/lib/image_list.go rename to vendor/src/github.com/docker/engine-api/client/image_list.go index d0b18ea911..d961570c4a 100644 --- a/api/client/lib/image_list.go +++ b/vendor/src/github.com/docker/engine-api/client/image_list.go @@ -1,11 +1,11 @@ -package lib +package client import ( "encoding/json" "net/url" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/filters" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/filters" ) // ImageList returns a list of images in the docker host. diff --git a/api/client/lib/image_load.go b/vendor/src/github.com/docker/engine-api/client/image_load.go similarity index 90% rename from api/client/lib/image_load.go rename to vendor/src/github.com/docker/engine-api/client/image_load.go index c713262c79..ea6924a57b 100644 --- a/api/client/lib/image_load.go +++ b/vendor/src/github.com/docker/engine-api/client/image_load.go @@ -1,10 +1,10 @@ -package lib +package client import ( "io" "net/url" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ImageLoad loads an image in the docker host from the client host. diff --git a/api/client/lib/image_pull.go b/vendor/src/github.com/docker/engine-api/client/image_pull.go similarity index 94% rename from api/client/lib/image_pull.go rename to vendor/src/github.com/docker/engine-api/client/image_pull.go index ef5f1ce6e6..69636925cb 100644 --- a/api/client/lib/image_pull.go +++ b/vendor/src/github.com/docker/engine-api/client/image_pull.go @@ -1,11 +1,11 @@ -package lib +package client import ( "io" "net/http" "net/url" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ImagePull request the docker host to pull an image from a remote registry. diff --git a/api/client/lib/image_push.go b/vendor/src/github.com/docker/engine-api/client/image_push.go similarity index 95% rename from api/client/lib/image_push.go rename to vendor/src/github.com/docker/engine-api/client/image_push.go index 14c369afac..fe3877dd31 100644 --- a/api/client/lib/image_push.go +++ b/vendor/src/github.com/docker/engine-api/client/image_push.go @@ -1,11 +1,11 @@ -package lib +package client import ( "io" "net/http" "net/url" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ImagePush request the docker host to push an image to a remote registry. diff --git a/api/client/lib/image_remove.go b/vendor/src/github.com/docker/engine-api/client/image_remove.go similarity index 91% rename from api/client/lib/image_remove.go rename to vendor/src/github.com/docker/engine-api/client/image_remove.go index fb221da6bd..c9c232cd1b 100644 --- a/api/client/lib/image_remove.go +++ b/vendor/src/github.com/docker/engine-api/client/image_remove.go @@ -1,10 +1,10 @@ -package lib +package client import ( "encoding/json" "net/url" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ImageRemove removes an image from the docker host. diff --git a/api/client/lib/image_save.go b/vendor/src/github.com/docker/engine-api/client/image_save.go similarity index 96% rename from api/client/lib/image_save.go rename to vendor/src/github.com/docker/engine-api/client/image_save.go index 10fb6130e8..755d05412d 100644 --- a/api/client/lib/image_save.go +++ b/vendor/src/github.com/docker/engine-api/client/image_save.go @@ -1,4 +1,4 @@ -package lib +package client import ( "io" diff --git a/api/client/lib/image_search.go b/vendor/src/github.com/docker/engine-api/client/image_search.go similarity index 91% rename from api/client/lib/image_search.go rename to vendor/src/github.com/docker/engine-api/client/image_search.go index 4e6bc7da13..5d9413c701 100644 --- a/api/client/lib/image_search.go +++ b/vendor/src/github.com/docker/engine-api/client/image_search.go @@ -1,12 +1,12 @@ -package lib +package client import ( "encoding/json" "net/http" "net/url" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/registry" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/registry" ) // ImageSearch makes the docker host to search by a term in a remote registry. diff --git a/api/client/lib/image_tag.go b/vendor/src/github.com/docker/engine-api/client/image_tag.go similarity index 88% rename from api/client/lib/image_tag.go rename to vendor/src/github.com/docker/engine-api/client/image_tag.go index d83e33fe23..5ae35914fe 100644 --- a/api/client/lib/image_tag.go +++ b/vendor/src/github.com/docker/engine-api/client/image_tag.go @@ -1,9 +1,9 @@ -package lib +package client import ( "net/url" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ImageTag tags an image in the docker host diff --git a/api/client/lib/info.go b/vendor/src/github.com/docker/engine-api/client/info.go similarity index 89% rename from api/client/lib/info.go rename to vendor/src/github.com/docker/engine-api/client/info.go index 04d854a290..666d4aee73 100644 --- a/api/client/lib/info.go +++ b/vendor/src/github.com/docker/engine-api/client/info.go @@ -1,11 +1,11 @@ -package lib +package client import ( "encoding/json" "fmt" "net/url" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // Info returns information about the docker server. diff --git a/api/client/lib/kill.go b/vendor/src/github.com/docker/engine-api/client/kill.go similarity index 96% rename from api/client/lib/kill.go rename to vendor/src/github.com/docker/engine-api/client/kill.go index 4da1a94008..d1820cbf9e 100644 --- a/api/client/lib/kill.go +++ b/vendor/src/github.com/docker/engine-api/client/kill.go @@ -1,4 +1,4 @@ -package lib +package client import "net/url" diff --git a/api/client/lib/login.go b/vendor/src/github.com/docker/engine-api/client/login.go similarity index 92% rename from api/client/lib/login.go rename to vendor/src/github.com/docker/engine-api/client/login.go index c896d67ef2..e9ba8421b0 100644 --- a/api/client/lib/login.go +++ b/vendor/src/github.com/docker/engine-api/client/login.go @@ -1,11 +1,11 @@ -package lib +package client import ( "encoding/json" "net/http" "net/url" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // RegistryLogin authenticates the docker server with a given docker registry. diff --git a/api/client/lib/logs.go b/vendor/src/github.com/docker/engine-api/client/logs.go similarity index 88% rename from api/client/lib/logs.go rename to vendor/src/github.com/docker/engine-api/client/logs.go index 119f41306d..58f1d97bd4 100644 --- a/api/client/lib/logs.go +++ b/vendor/src/github.com/docker/engine-api/client/logs.go @@ -1,12 +1,12 @@ -package lib +package client import ( "io" "net/url" "time" - "github.com/docker/docker/api/types" - timetypes "github.com/docker/docker/api/types/time" + "github.com/docker/engine-api/types" + timetypes "github.com/docker/engine-api/types/time" ) // ContainerLogs returns the logs generated by a container in an io.ReadCloser. diff --git a/api/client/lib/network.go b/vendor/src/github.com/docker/engine-api/client/network.go similarity index 96% rename from api/client/lib/network.go rename to vendor/src/github.com/docker/engine-api/client/network.go index e38d9e8c8b..b35604e067 100644 --- a/api/client/lib/network.go +++ b/vendor/src/github.com/docker/engine-api/client/network.go @@ -1,12 +1,12 @@ -package lib +package client import ( "encoding/json" "net/http" "net/url" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/filters" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/filters" ) // NetworkCreate creates a new network in the docker host. diff --git a/api/client/lib/pause.go b/vendor/src/github.com/docker/engine-api/client/pause.go similarity index 94% rename from api/client/lib/pause.go rename to vendor/src/github.com/docker/engine-api/client/pause.go index 3247ec3a57..7671be9f95 100644 --- a/api/client/lib/pause.go +++ b/vendor/src/github.com/docker/engine-api/client/pause.go @@ -1,4 +1,4 @@ -package lib +package client // ContainerPause pauses the main process of a given container without terminating it. func (cli *Client) ContainerPause(containerID string) error { diff --git a/api/client/lib/privileged.go b/vendor/src/github.com/docker/engine-api/client/privileged.go similarity index 95% rename from api/client/lib/privileged.go rename to vendor/src/github.com/docker/engine-api/client/privileged.go index cb3da51ea8..945f18cef5 100644 --- a/api/client/lib/privileged.go +++ b/vendor/src/github.com/docker/engine-api/client/privileged.go @@ -1,4 +1,4 @@ -package lib +package client // RequestPrivilegeFunc is a function interface that // clients can supply to retry operations after diff --git a/api/client/lib/request.go b/vendor/src/github.com/docker/engine-api/client/request.go similarity index 99% rename from api/client/lib/request.go rename to vendor/src/github.com/docker/engine-api/client/request.go index 67984d116b..cd8c3176d8 100644 --- a/api/client/lib/request.go +++ b/vendor/src/github.com/docker/engine-api/client/request.go @@ -1,4 +1,4 @@ -package lib +package client import ( "bytes" diff --git a/api/client/lib/resize.go b/vendor/src/github.com/docker/engine-api/client/resize.go similarity index 93% rename from api/client/lib/resize.go rename to vendor/src/github.com/docker/engine-api/client/resize.go index dffd81d544..6ccd92cd9b 100644 --- a/api/client/lib/resize.go +++ b/vendor/src/github.com/docker/engine-api/client/resize.go @@ -1,10 +1,10 @@ -package lib +package client import ( "net/url" "strconv" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ContainerResize changes the size of the tty for a container. diff --git a/api/client/lib/version.go b/vendor/src/github.com/docker/engine-api/client/version.go similarity index 88% rename from api/client/lib/version.go rename to vendor/src/github.com/docker/engine-api/client/version.go index 4101bfee0b..e97b79801d 100644 --- a/api/client/lib/version.go +++ b/vendor/src/github.com/docker/engine-api/client/version.go @@ -1,9 +1,9 @@ -package lib +package client import ( "encoding/json" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ServerVersion returns information of the docker client and server host. diff --git a/api/client/lib/volume.go b/vendor/src/github.com/docker/engine-api/client/volume.go similarity index 94% rename from api/client/lib/volume.go rename to vendor/src/github.com/docker/engine-api/client/volume.go index fdcd1cf529..3419def9bb 100644 --- a/api/client/lib/volume.go +++ b/vendor/src/github.com/docker/engine-api/client/volume.go @@ -1,12 +1,12 @@ -package lib +package client import ( "encoding/json" "net/http" "net/url" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/filters" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/filters" ) // VolumeList returns the volumes configured in the docker host. diff --git a/api/client/lib/wait.go b/vendor/src/github.com/docker/engine-api/client/wait.go similarity index 90% rename from api/client/lib/wait.go rename to vendor/src/github.com/docker/engine-api/client/wait.go index 70993d84aa..17cb1d8ab5 100644 --- a/api/client/lib/wait.go +++ b/vendor/src/github.com/docker/engine-api/client/wait.go @@ -1,9 +1,9 @@ -package lib +package client import ( "encoding/json" - "github.com/docker/docker/api/types" + "github.com/docker/engine-api/types" ) // ContainerWait pauses execution util a container is exits. diff --git a/api/types/auth.go b/vendor/src/github.com/docker/engine-api/types/auth.go similarity index 100% rename from api/types/auth.go rename to vendor/src/github.com/docker/engine-api/types/auth.go diff --git a/api/types/blkiodev/blkio.go b/vendor/src/github.com/docker/engine-api/types/blkiodev/blkio.go similarity index 100% rename from api/types/blkiodev/blkio.go rename to vendor/src/github.com/docker/engine-api/types/blkiodev/blkio.go diff --git a/api/types/client.go b/vendor/src/github.com/docker/engine-api/types/client.go similarity index 98% rename from api/types/client.go rename to vendor/src/github.com/docker/engine-api/types/client.go index c936235173..77d94f33a1 100644 --- a/api/types/client.go +++ b/vendor/src/github.com/docker/engine-api/types/client.go @@ -5,8 +5,8 @@ import ( "io" "net" - "github.com/docker/docker/api/types/container" - "github.com/docker/docker/api/types/filters" + "github.com/docker/engine-api/types/container" + "github.com/docker/engine-api/types/filters" "github.com/docker/go-units" ) diff --git a/api/types/configs.go b/vendor/src/github.com/docker/engine-api/types/configs.go similarity index 96% rename from api/types/configs.go rename to vendor/src/github.com/docker/engine-api/types/configs.go index 43ea4c10a5..fafbb5b53e 100644 --- a/api/types/configs.go +++ b/vendor/src/github.com/docker/engine-api/types/configs.go @@ -1,6 +1,6 @@ package types -import "github.com/docker/docker/api/types/container" +import "github.com/docker/engine-api/types/container" // configs holds structs used for internal communication between the // frontend (such as an http server) and the backend (such as the diff --git a/api/types/container/config.go b/vendor/src/github.com/docker/engine-api/types/container/config.go similarity index 98% rename from api/types/container/config.go rename to vendor/src/github.com/docker/engine-api/types/container/config.go index 5459b5dbaf..b4e6205d21 100644 --- a/api/types/container/config.go +++ b/vendor/src/github.com/docker/engine-api/types/container/config.go @@ -1,7 +1,7 @@ package container import ( - "github.com/docker/docker/api/types/strslice" + "github.com/docker/engine-api/types/strslice" "github.com/docker/go-connections/nat" ) diff --git a/api/types/container/host_config.go b/vendor/src/github.com/docker/engine-api/types/container/host_config.go similarity index 98% rename from api/types/container/host_config.go rename to vendor/src/github.com/docker/engine-api/types/container/host_config.go index 623e5d108f..ac425921b8 100644 --- a/api/types/container/host_config.go +++ b/vendor/src/github.com/docker/engine-api/types/container/host_config.go @@ -3,8 +3,8 @@ package container import ( "strings" - "github.com/docker/docker/api/types/blkiodev" - "github.com/docker/docker/api/types/strslice" + "github.com/docker/engine-api/types/blkiodev" + "github.com/docker/engine-api/types/strslice" "github.com/docker/go-connections/nat" "github.com/docker/go-units" ) diff --git a/api/types/container/hostconfig_unix.go b/vendor/src/github.com/docker/engine-api/types/container/hostconfig_unix.go similarity index 100% rename from api/types/container/hostconfig_unix.go rename to vendor/src/github.com/docker/engine-api/types/container/hostconfig_unix.go diff --git a/api/types/container/hostconfig_windows.go b/vendor/src/github.com/docker/engine-api/types/container/hostconfig_windows.go similarity index 100% rename from api/types/container/hostconfig_windows.go rename to vendor/src/github.com/docker/engine-api/types/container/hostconfig_windows.go diff --git a/api/types/events/events.go b/vendor/src/github.com/docker/engine-api/types/events/events.go similarity index 100% rename from api/types/events/events.go rename to vendor/src/github.com/docker/engine-api/types/events/events.go diff --git a/api/types/filters/parse.go b/vendor/src/github.com/docker/engine-api/types/filters/parse.go similarity index 100% rename from api/types/filters/parse.go rename to vendor/src/github.com/docker/engine-api/types/filters/parse.go diff --git a/api/types/network/network.go b/vendor/src/github.com/docker/engine-api/types/network/network.go similarity index 100% rename from api/types/network/network.go rename to vendor/src/github.com/docker/engine-api/types/network/network.go diff --git a/api/types/registry/registry.go b/vendor/src/github.com/docker/engine-api/types/registry/registry.go similarity index 100% rename from api/types/registry/registry.go rename to vendor/src/github.com/docker/engine-api/types/registry/registry.go diff --git a/api/types/stats.go b/vendor/src/github.com/docker/engine-api/types/stats.go similarity index 100% rename from api/types/stats.go rename to vendor/src/github.com/docker/engine-api/types/stats.go diff --git a/api/types/strslice/strslice.go b/vendor/src/github.com/docker/engine-api/types/strslice/strslice.go similarity index 100% rename from api/types/strslice/strslice.go rename to vendor/src/github.com/docker/engine-api/types/strslice/strslice.go diff --git a/api/types/time/timestamp.go b/vendor/src/github.com/docker/engine-api/types/time/timestamp.go similarity index 98% rename from api/types/time/timestamp.go rename to vendor/src/github.com/docker/engine-api/types/time/timestamp.go index 68895ec727..d3695ba723 100644 --- a/api/types/time/timestamp.go +++ b/vendor/src/github.com/docker/engine-api/types/time/timestamp.go @@ -78,7 +78,7 @@ func GetTimestamp(value string, reference time.Time) (string, error) { var err error if parseInLocation { - t, err = time.ParseInLocation(format, value, time.FixedZone(time.Now().Zone())) + t, err = time.ParseInLocation(format, value, time.FixedZone(reference.Zone())) } else { t, err = time.Parse(format, value) } diff --git a/api/types/types.go b/vendor/src/github.com/docker/engine-api/types/types.go similarity index 98% rename from api/types/types.go rename to vendor/src/github.com/docker/engine-api/types/types.go index 80780ca9b0..5f9e018998 100644 --- a/api/types/types.go +++ b/vendor/src/github.com/docker/engine-api/types/types.go @@ -4,9 +4,9 @@ import ( "os" "time" - "github.com/docker/docker/api/types/container" - "github.com/docker/docker/api/types/network" - "github.com/docker/docker/api/types/registry" + "github.com/docker/engine-api/types/container" + "github.com/docker/engine-api/types/network" + "github.com/docker/engine-api/types/registry" "github.com/docker/go-connections/nat" ) diff --git a/api/types/versions/v1p19/types.go b/vendor/src/github.com/docker/engine-api/types/versions/v1p19/types.go similarity index 86% rename from api/types/versions/v1p19/types.go rename to vendor/src/github.com/docker/engine-api/types/versions/v1p19/types.go index dc13150545..4ed4335881 100644 --- a/api/types/versions/v1p19/types.go +++ b/vendor/src/github.com/docker/engine-api/types/versions/v1p19/types.go @@ -2,9 +2,9 @@ package v1p19 import ( - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" - "github.com/docker/docker/api/types/versions/v1p20" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/container" + "github.com/docker/engine-api/types/versions/v1p20" "github.com/docker/go-connections/nat" ) diff --git a/api/types/versions/v1p20/types.go b/vendor/src/github.com/docker/engine-api/types/versions/v1p20/types.go similarity index 92% rename from api/types/versions/v1p20/types.go rename to vendor/src/github.com/docker/engine-api/types/versions/v1p20/types.go index fa395ac1f6..ed800061fa 100644 --- a/api/types/versions/v1p20/types.go +++ b/vendor/src/github.com/docker/engine-api/types/versions/v1p20/types.go @@ -2,8 +2,8 @@ package v1p20 import ( - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" + "github.com/docker/engine-api/types" + "github.com/docker/engine-api/types/container" "github.com/docker/go-connections/nat" )