Commit Graph

8 Commits

Author SHA1 Message Date
Sebastiaan van Stijn 518b65c6f5 Ignore certificate expiry error for top-level inspect
The top-level `docker inspect` command could return
an error if the nodes Swarm certificates were expired.

In situations where the user did not explicitly
ask for an object-type (`--type=foo`), we should
ignore these errors, and consider them equal to
"node is not a swarm manager".

This change makes `docker inspect` ignore these
errors if no type was specified.

As a further optimization, the "swarm status"
result is now stored in a variable, so that
other swarm-specific API calls can be skipped.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-12-13 17:22:43 +01:00
Yong Tang 492c2c8da8 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>
2016-12-02 11:33:29 -08:00
Vincent Bernat 0e6f4e7cda cli: shorten description of "inspect" subcommand
The short description should be kept short. Spanning on several lines is
a bit ugly. A user can still get more information in the manual or we
can expand the long description instead if we want (there is currently
none).

This reverts a bit of #26683.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
2016-11-03 20:46:28 +01:00
Sebastiaan van Stijn 36e66d54c9 Merge pull request #26683 from yuexiao-wang/update-inspect
Modify short and flags for docker inspect
2016-10-31 13:39:59 -07:00
yuexiao-wang 6027424adf Modify short and flags for docker inspect
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-10-31 18:11:25 +08:00
yuexiao-wang 24d0191a3a Fix typs from go to Go
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-10-18 19:40:16 +08:00
Yong Tang 9aba07679f Fix issue of `WARNING: --size ignored for volume` for `docker inspect`
When `docker inspect` is invoked, it is possible to pass a flag of
`-s` for container types to display size information. If `-s` is used
for non-container types then a warning `WARNING: --size ignored for volume`
will show up.

However, currently `WARNING: --size ignored for volume` will show up even
when `-s` is not passed to `docker inspect` for non-container types.

This fix fixes this issue by checking if `-s` has been passed or not (`getSize`).
Also, since image inspect does not support `-s`, `IsSizeSupported` has been changed
to false for images.

This fix is tested manually.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-12 23:08:19 -07:00
Daniel Nephin 3bd1eb4b76 Move api/client -> cli/command
Using
  gomvpkg
     -from github.com/docker/docker/api/client
     -to github.com/docker/docker/cli/command
     -vcs_mv_cmd 'git mv {{.Src}} {{.Dst}}'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-08 15:46:29 -04:00