Commit Graph

30 Commits

Author SHA1 Message Date
708ad46cdf Adopt text/template in node inspect
Signed-off-by: Manjunath A Kumatagi <mkumatag@in.ibm.com>
Upstream-commit: 5dbd6afb5144a937df73bfe42364e583e789d80d
Component: engine
2017-04-10 17:47:15 +05:30
964a70f1c3 Add hidden placeholder of .Self for docker node ls --format
This commit adds a hidden placeholder of `.Self` for
`docker node ls --format` so that if the node is the same
as the current docker daemon, then a `*` is outputed.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7328ae12cc3e14b3eb6ab01f09f6d94a82a44066
Component: engine
2017-04-04 12:46:44 -07:00
c7270d4d81 Add --format for docker node ls
This fix tries to address the comment https://github.com/docker/docker/pull/30376#discussion_r97465334
where it was not possible to specify `--format` for `docker node ls`. The `--format` flag
is a quite useful flag that could be used in many places such as completion.

This fix implements `--format` for `docker node ls` and add `nodesFormat` in config.json
so that it is possible to specify the output when `docker node ls` is invoked.

Related documentations have been updated.

A set of unit tests have been added.

This fix is related to #30376.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 32e21ecbfe3af9a8b5762ad1a549518221c4939e
Component: engine
2017-04-04 11:26:35 -07:00
a2c8d31405 Merge pull request #31989 from aaronlehmann/node-ps-outside-swarm-mode
cli: Wrong error message from "node ps" outside swarm mode
Upstream-commit: d9c3c1928d6089f0bc064cd0032b82505133231d
Component: engine
2017-04-03 16:15:24 +02:00
7cc7eec39f Replace fmt.Errorf() with errors.Errorf() in the cli
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7b7ea8ab810190018346cb7d84c161bb94f7ca60
Component: engine
2017-03-24 16:58:07 -04:00
042f28b7a4 cli: Wrong error message from "node ps" outside swarm mode
"docker node ps" behaves strangely outside swarm mode:

    $ docker node ps
    ID                  NAME                IMAGE               NODE                DESIRED STATE       CURRENT STATE       ERROR               PORTS
    Error: No such node:

It should explain that the node is not a swarm manager.

The reason this happens is that the argument to "docker node ps" defaults
to "self". The first thing the command does is try to resolve "self" to
a node ID using the /info endpoint. If there is no node ID, it tries to
use the empty string as an ID, and tries to GET /nodes/, which is not a
valid endpoint.

Change the command to check if the node ID is present in the /info
response. If it isn't, a swarm API endpoint can supply a useful error
message.

Also, avoid printing the column headers if the only following text is an
error.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: ad1c96c6a72a503df956b220b3f8752683bc0896
Component: engine
2017-03-21 17:01:07 -07:00
943990f090 Add missing API version annotations to commands
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e638089622af0448ee0d5d95c45575b63338c938
Component: engine
2017-03-16 13:40:12 +01:00
718b046537 Delete dots to align with other commands description
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
Upstream-commit: ec95ad7353b240542f73076dde975e392c281748
Component: engine
2017-02-23 16:46:08 +08:00
301cc805aa Merge pull request #30814 from YuPengZTE/devSwarmCliExplain
fix the type
Upstream-commit: 25500d56a5f3a94456bd8172a64bf119cc36dd7f
Component: engine
2017-02-21 00:59:58 +01:00
a532e48c46 fix the type
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
Upstream-commit: d735972d3150fa4e286ce468f033156fa22fddb7
Component: engine
2017-02-14 09:54:27 +08:00
08e260c901 Add --format to docker service ps
This fix tries to address the issue raised in 27189 where
it is not possible to support configured formatting stored in
config.json.

Since `--format` was not supported in `docker service ps`,
the flag `--format` has also been added in this fix.

This fix
1. Add `--format` to `docker service ps`
2. Add `tasksFormat` to config.json
3. Add `--format` to `docker stack ps`
4. Add `--format` to `docker node ps`

The related docs has been updated.

An integration test has been added.

This fix fixes 27189.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f8c7c921d905615acf1d2c6577ae1cfb4600bec0
Component: engine
2017-02-10 16:53:04 -08:00
f6ad06ceb6 Add some unit tests to the node and swarm cli code
Start work on adding unit tests to our cli code in order to have to
write less costly integration test.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f151c297eb268e22dc1eb36ded0e356885f40739
Component: engine
2017-01-09 18:30:15 +01:00
871ee3d12b Revert "Add -a option to service/node ps"
This reverts commit 139fff2bf0ebe12b61871ba8ec8be8d51c2338db.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: eb55d03f3c321e31c8da993233b2679f47d5b4e1
Component: engine
2016-11-28 18:08:45 +01:00
2e39dde1e5 refactor help func in CLI
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: bf95472105e5dad55314cfff599abea5b81b134a
Component: engine
2016-11-17 10:54:10 -08:00
6b90362056 Merge pull request #28196 from allencloud/add-short-flag-for-force
add short flag for force
Upstream-commit: fe77fc5bf11157391c937748b68fffe1c758c60a
Component: engine
2016-11-09 18:11:58 +01:00
0d66e8de2c add short flag for force
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 955c35b6a62f26e7ca36fa6378110ce7af8916a4
Component: engine
2016-11-09 14:40:47 +08: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
feddd2acda Merge pull request #25983 from jhorwit2/jah/ps-refactor
Add -a option to service/node ps
Upstream-commit: 89ef0f21510cf14eb78f2c0677cc936882c5a261
Component: engine
2016-11-07 17:33:10 +01:00
b9b5178daa Add -a option to service/node ps
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
Upstream-commit: 139fff2bf0ebe12b61871ba8ec8be8d51c2338db
Component: engine
2016-11-06 07:40:39 -05:00
e11e25579b added node ip autodetection
Manager now auto-detects the address that an agent connects to the cluster
from and stores it. This is useful for many kinds of internal cluster
management tools.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 9bcf623719104fbd196ab0ca14af48f790980499
Component: engine
2016-11-03 08:10:14 -07:00
3e5ee94d25 node rm can be applied on not only active node
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 002262d6f5d9d88b690124b3743db6856fe4f599
Component: engine
2016-11-02 17:22:04 +08:00
9cb45952e0 Replace all "Filter" field with "Filters" for consistency
In file `api/types/client.go`, some of the "*Options{}" structs own a
`Filters` field while some else have the name of `Filter`, this commit
will rename all `Filter` to `Filters` for consistency. Also `Filters`
is consistent with API with format `/xxx?filters=xxx`, that's why
`Filters` is the right name.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 89a6966726941b4b7f0431ab214013cf9c655c25
Component: engine
2016-11-01 23:09:30 +08:00
8b5b6bf896 make every node and plugin removal call api
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: c6d57ca0768fc1e89f6fe63e535c7d92610b3773
Component: engine
2016-10-19 06:40:30 +08:00
77c700603f Fix typs from go to Go
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 7dad9d5ce45f25750f339642d3b84a81cc2ba98e
Component: engine
2016-10-18 19:40:16 +08:00
9525b615e5 return nil when no node or service to avoid additional api call
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 3af743bb329df9e044d3807cde4200ff6da7bf7c
Component: engine
2016-10-11 10:59:16 +08:00
8493b1e3af add \n in engine labels display in docker node inspect xxx --pretty
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: ddec4c3ee4e51cb62060f752777bdd32e86607e3
Component: engine
2016-09-29 18:17:54 +08:00
69f06771c4 Merge pull request #26299 from allencloud/support-docker-node-ps-multi-nodes
support docker node ps multiNodes
Upstream-commit: c03c80b1b03f3a061072af07d6d1fb811f29a9e3
Component: engine
2016-09-23 09:50:24 +02:00
89cbe8e685 Only hide commands if the env variable is set.
Better formatting for usage template.
Group commands in usage to management/operation commands.
Remove the word Docker from the description of management commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a7c8bcac2ba60d6dd25a1157085d9245bed556ce
Component: engine
2016-09-19 13:28:15 -04:00
69668dcc9a support docker node ps multiNodes
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: af4461ad290d660acab5ef87b96e392263cc7cb9
Component: engine
2016-09-10 02:52:48 +08:00
d8acc366ce 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>
Upstream-commit: 0640a14b4fcba3715f7cc3bc9444f3c7f4827edd
Component: engine
2016-09-08 15:46:29 -04:00