Merge pull request #24562 from thaJeztah/carry-24499-swarm-info-consistency

[carry 24499] Remove "Yes"/"No" and use "true"/"false" consistently in `docker info`
This commit is contained in:
Vincent Demeester 2016-07-13 15:13:58 +02:00 коммит произвёл GitHub
Родитель a9a8d807f0 ea365e4cb3
Коммит 92b1577871
3 изменённых файлов: 5 добавлений и 7 удалений

Просмотреть файл

@ -81,13 +81,11 @@ func runInfo(dockerCli *client.DockerCli) error {
if info.Swarm.Error != "" { if info.Swarm.Error != "" {
fmt.Fprintf(dockerCli.Out(), " Error: %v\n", info.Swarm.Error) fmt.Fprintf(dockerCli.Out(), " Error: %v\n", info.Swarm.Error)
} }
fmt.Fprintf(dockerCli.Out(), " Is Manager: %v\n", info.Swarm.ControlAvailable)
if info.Swarm.ControlAvailable { if info.Swarm.ControlAvailable {
fmt.Fprintf(dockerCli.Out(), " IsManager: Yes\n")
fmt.Fprintf(dockerCli.Out(), " Managers: %d\n", info.Swarm.Managers) fmt.Fprintf(dockerCli.Out(), " Managers: %d\n", info.Swarm.Managers)
fmt.Fprintf(dockerCli.Out(), " Nodes: %d\n", info.Swarm.Nodes) fmt.Fprintf(dockerCli.Out(), " Nodes: %d\n", info.Swarm.Nodes)
ioutils.FprintfIfNotEmpty(dockerCli.Out(), " CACertHash: %s\n", info.Swarm.CACertHash) ioutils.FprintfIfNotEmpty(dockerCli.Out(), " CA Certificate Hash: %s\n", info.Swarm.CACertHash)
} else {
fmt.Fprintf(dockerCli.Out(), " IsManager: No\n")
} }
} }

Просмотреть файл

@ -56,7 +56,7 @@ storage driver and a node that is part of a 2 node Swarm cluster:
Network: bridge null host overlay Network: bridge null host overlay
Swarm: Swarm:
NodeID: 0gac67oclbxq7 NodeID: 0gac67oclbxq7
IsManager: YES Is Manager: true
Managers: 2 Managers: 2
Nodes: 2 Nodes: 2
Runtimes: default Runtimes: default

Просмотреть файл

@ -57,10 +57,10 @@ node. For example, the tutorial uses a machine named `manager1`.
...snip... ...snip...
Swarm: active Swarm: active
NodeID: dxn1zf6l61qsb1josjja83ngz NodeID: dxn1zf6l61qsb1josjja83ngz
IsManager: Yes Is Manager: true
Managers: 1 Managers: 1
Nodes: 1 Nodes: 1
CACertHash: sha256:b7986d3baeff2f5664dfe350eec32e2383539ec1a802ba541c4eb829056b5f61 CA Certificate Hash: sha256:b7986d3baeff2f5664dfe350eec32e2383539ec1a802ba541c4eb829056b5f61
...snip... ...snip...
``` ```