mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Hostname -> Name
Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
parent
6e92dfdfd8
commit
227f4bbdb3
5 changed files with 6 additions and 7 deletions
|
@ -505,8 +505,8 @@ func (cli *DockerCli) CmdInfo(args ...string) error {
|
|||
if remoteInfo.Exists("MemTotal") {
|
||||
fmt.Fprintf(cli.out, "Total Memory: %s\n", units.BytesSize(float64(remoteInfo.GetInt64("MemTotal"))))
|
||||
}
|
||||
if remoteInfo.Exists("Hostname") {
|
||||
fmt.Fprintf(cli.out, "Hostname: %s\n", remoteInfo.Get("Hostname"))
|
||||
if remoteInfo.Exists("Name") {
|
||||
fmt.Fprintf(cli.out, "Name: %s\n", remoteInfo.Get("Name"))
|
||||
}
|
||||
if remoteInfo.Exists("ID") {
|
||||
fmt.Fprintf(cli.out, "ID: %s\n", remoteInfo.Get("ID"))
|
||||
|
|
|
@ -77,7 +77,7 @@ func (daemon *Daemon) CmdInfo(job *engine.Job) engine.Status {
|
|||
v.SetInt("NCPU", runtime.NumCPU())
|
||||
v.SetInt64("MemTotal", meminfo.MemTotal)
|
||||
if hostname, err := os.Hostname(); err == nil {
|
||||
v.Set("Hostname", hostname)
|
||||
v.Set("Name", hostname)
|
||||
}
|
||||
if _, err := v.WriteTo(job.Stdout); err != nil {
|
||||
return job.Error(err)
|
||||
|
|
|
@ -50,8 +50,7 @@ You can still call an old version of the API using
|
|||
|
||||
**New!**
|
||||
`info` now returns the number of CPUs available on the machine (`NCPU`),
|
||||
total memory available (`MemTotal`), the short hostname (`Hostname`). and
|
||||
the ID (`ID`).
|
||||
total memory available (`MemTotal`), a name (`Name`), and the ID (`ID`).
|
||||
|
||||
`POST /containers/create`
|
||||
|
||||
|
|
|
@ -1220,7 +1220,7 @@ Display system-wide information
|
|||
"KernelVersion":"3.12.0-1-amd64"
|
||||
"NCPU":1,
|
||||
"MemTotal":2099236864,
|
||||
"Hostname":"prod-server-42",
|
||||
"Name":"prod-server-42",
|
||||
"ID":"7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS"
|
||||
"Debug":false,
|
||||
"NFd": 11,
|
||||
|
|
|
@ -856,7 +856,7 @@ For example:
|
|||
Kernel Version: 3.13.0-24-generic
|
||||
Operating System: Ubuntu 14.04 LTS
|
||||
CPUs: 1
|
||||
Hostname: prod-server-42
|
||||
Name: prod-server-42
|
||||
ID: 7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS
|
||||
Total Memory: 2 GiB
|
||||
Debug mode (server): false
|
||||
|
|
Loading…
Reference in a new issue