Browse code

Hostname -> Name

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

Victor Vieux authored on 2014/11/18 06:54:11
Showing 5 changed files
... ...
@@ -505,8 +505,8 @@ func (cli *DockerCli) CmdInfo(args ...string) error {
505 505
 	if remoteInfo.Exists("MemTotal") {
506 506
 		fmt.Fprintf(cli.out, "Total Memory: %s\n", units.BytesSize(float64(remoteInfo.GetInt64("MemTotal"))))
507 507
 	}
508
-	if remoteInfo.Exists("Hostname") {
509
-		fmt.Fprintf(cli.out, "Hostname: %s\n", remoteInfo.Get("Hostname"))
508
+	if remoteInfo.Exists("Name") {
509
+		fmt.Fprintf(cli.out, "Name: %s\n", remoteInfo.Get("Name"))
510 510
 	}
511 511
 	if remoteInfo.Exists("ID") {
512 512
 		fmt.Fprintf(cli.out, "ID: %s\n", remoteInfo.Get("ID"))
... ...
@@ -77,7 +77,7 @@ func (daemon *Daemon) CmdInfo(job *engine.Job) engine.Status {
77 77
 	v.SetInt("NCPU", runtime.NumCPU())
78 78
 	v.SetInt64("MemTotal", meminfo.MemTotal)
79 79
 	if hostname, err := os.Hostname(); err == nil {
80
-		v.Set("Hostname", hostname)
80
+		v.Set("Name", hostname)
81 81
 	}
82 82
 	if _, err := v.WriteTo(job.Stdout); err != nil {
83 83
 		return job.Error(err)
... ...
@@ -50,8 +50,7 @@ You can still call an old version of the API using
50 50
 
51 51
 **New!**
52 52
 `info` now returns the number of CPUs available on the machine (`NCPU`),
53
-total memory available (`MemTotal`), the short hostname (`Hostname`). and
54
-the ID (`ID`).
53
+total memory available (`MemTotal`), a name (`Name`), and the ID (`ID`).
55 54
 
56 55
 `POST /containers/create`
57 56
 
... ...
@@ -1220,7 +1220,7 @@ Display system-wide information
1220 1220
              "KernelVersion":"3.12.0-1-amd64"
1221 1221
              "NCPU":1,
1222 1222
              "MemTotal":2099236864,
1223
-             "Hostname":"prod-server-42",
1223
+             "Name":"prod-server-42",
1224 1224
              "ID":"7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS"
1225 1225
              "Debug":false,
1226 1226
              "NFd": 11,
... ...
@@ -856,7 +856,7 @@ For example:
856 856
     Kernel Version: 3.13.0-24-generic
857 857
     Operating System: Ubuntu 14.04 LTS
858 858
     CPUs: 1
859
-    Hostname: prod-server-42
859
+    Name: prod-server-42
860 860
     ID: 7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS
861 861
     Total Memory: 2 GiB
862 862
     Debug mode (server): false