Commit Graph

18 Commits

Author SHA1 Message Date
0f96e98e12 Various code-cleanup
remove unnescessary import aliases, brackets, and so on.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f23c00d8701e4bd0f2372a586dacbf66a26f9a51
Component: engine
2018-05-23 17:50:54 +02:00
be83c11fb0 Add canonical import comment
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4f0d95fa6ee7f865597c03b9e63702cdcb0f7067
Component: engine
2018-02-05 16:51:57 -05:00
72747182f4 Remove deprecated IsErr...NotFound() functions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7553fc4bcd80d103096f2e8f662b7fb3c65b5249
Component: engine
2017-10-03 12:07:49 +02:00
e38ecccceb Match not implemented error check to others
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 7406088853b6cbcb8996c367062cee2e1ee6eaaa
Component: engine
2017-09-25 13:58:51 +02:00
20c1a2b928 Handle plugin list not implemented
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: e7e11bdd44878d28c642d72761aa41eb9ffce3d1
Component: engine
2017-09-20 19:48:33 +02:00
ee7b60968b Cleanup client not found errors.
And fix remove calls to return a notFound error

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 81bb9978ab5ac99e84a5bf62d0d469f0aec1d506
Component: engine
2017-09-11 19:53:18 -04:00
980d05f2ea Cleanup client/ interface
- Remove ParseLogDetails, this is not part of the client. Moved to docker/cli
- Deprecate ParseHost and replace with ParseHostURL
- Deprecate redundant IsErr helpers

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 54242cd067c234960d1295a67271475f9d099f22
Component: engine
2017-09-07 12:32:38 -04:00
5852d59e6d Fix NewVersionError() for clients using default version
The NewVersionError checks if the client is using the API version
required for using a specific feature.

If the client is initialized without setting a specific version, an
error would be generated because it was not possible to compare
versions. However, a client without explicit version set is running
the latest supported version.

This patch changes the behavior to only generate an error if a version
was set.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ff2ed1853099a210245814b4263ce1c92b14c153
Component: engine
2017-06-29 22:22:32 -07:00
f1fba04069 Add configs support to client
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 102738101a68711c2ca50e36b24d389c35d087df
Component: engine
2017-05-11 10:08:21 -07:00
07cd3d04be print error if unsupported flags are used
Docker 1.13 and up allows a client to communicate
with older daemons. As a result, flags may be
present that are not supported by the older daemon.

The client already _hides_ flags that are not
supported yet, but this doesn't present users
from using those flags.

This change shows an error if a flag is used
that is not supported by the daemon (either
based on the API version, or because experimental
features are not enabled).

Note that for some options, a check is already
in place in the API client. For those
options, this is just a minor enhancement
to more clearly indicate which _flag_ is
not supported.

Before this change;

    DOCKER_API_VERSION=1.24 docker run -d --stop-timeout=30 busybox top
    mjfyt3qpvnq0iwmun3sjwth9i

    echo -e "FROM busybox\nRUN echo foo > bar" |  DOCKER_API_VERSION=1.24 docker build --squash -
    "squash" requires API version 1.25, but the Docker server is version 1.24

After this change;

    DOCKER_API_VERSION=1.24 docker run -d --stop-timeout=30 busybox top
    "--stop-timeout" requires API version 1.25, but the Docker daemon is version 1.24

    echo -e "FROM busybox\nRUN echo foo > bar" | DOCKER_API_VERSION=1.24 docker build --squash -
    "--squash" requires API version 1.25, but the Docker daemon is version 1.24

    echo -e "FROM busybox\nRUN echo foo > bar" | docker build --squash -
    "--squash" is only supported on a Docker daemon with experimental features enabled

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 34148978bd0f71692e2584add60018e10b8ff68d
Component: engine
2017-02-03 16:59:20 -08:00
209ed6b4ef change minor mistake of spelling
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 7c3657065cc04af278a0f1cee99de8c2401ba0ef
Component: engine
2016-12-20 21:05:19 +08:00
8d0b8ac112 Support plugins in docker inspect
This fix tries to address the proposal raised in 28946
to support plugins in `docker inspect`.

The command `docker inspect` already supports
"container", "image", "node", "network", "service", "volume", "task".
However, `--type plugin` is not supported yet at the moment.

This fix address this issue by adding the support of `--type plugin`
for `docker inspect`.

An additional integration test has been added to cover the changes.

This fix fixes 28946.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 90bb2cdb9f15a9b1b9a4e2ea4242882665daac4e
Component: engine
2016-12-02 11:33:29 -08:00
3bfc791696 fix incorrect ErrConnectFailed comparison
Signed-off-by: Reficul <xuzhenglun@gmail.com>
Upstream-commit: d5dc9b8b1f5e693cfb3aace06e08e7fc6eb798d7
Component: engine
2016-11-22 10:42:55 +08:00
848c015ac1 more review updates
- use /secrets for swarm secret create route
- do not specify omitempty for secret and secret reference
- simplify lookup for secret ids
- do not use pointer for secret grpc conversion

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 189f89301e0abfee32447f2ca23dacd3a96de06d
Component: engine
2016-11-09 14:27:43 -05:00
9dbbc071d5 secrets: secret management for swarm
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: use tmpfs for swarm secrets

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: inject secrets from swarm secret store

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

secrets: use secret names in cli for service create

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

switch to use mounts instead of volumes

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

vendor: use ehazlett swarmkit

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

secrets: finish secret update

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 3716ec25b423d8ff7dfa231a7b3cf0154726ed37
Component: engine
2016-11-09 14:27:43 -05:00
d0ebaa81e8 always add but hide experimental cmds and flags
Signed-off-by: Victor Vieux <vieux@docker.com>

update cobra and use Tags

Signed-off-by: Victor Vieux <vieux@docker.com>

allow client to talk to an older server

Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: e98e4a71110fd33852bb755a9b8b4ebc9df904db
Component: engine
2016-11-08 04:55:27 -08:00
7c290e5ed5 fix typo in client/errors.go comments
Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
Upstream-commit: a68ba6be5d5e3341bb1deca52329d1a8aa6c024d
Component: engine
2016-10-08 15:29:32 +08:00
60a22c207c Move engine-api client package
This moves the engine-api client package to `/docker/docker/client`.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 7c36a1af031b510cd990cf488ee5998a3efb450f
Component: engine
2016-09-07 11:05:58 -07:00