/info: Add keys Architecture, OSType
- introduces Swarm-relevant keys, see #13634 - docs updated Signed-off-by: Olle Jonsson <olle.jonsson@gmail.com>
This commit is contained in:
parent
31a6e01f47
commit
4e8fcd4002
8 changed files with 16 additions and 0 deletions
|
@ -46,6 +46,8 @@ func (cli *DockerCli) CmdInfo(args ...string) error {
|
|||
ioutils.FprintfIfNotEmpty(cli.out, "Logging Driver: %s\n", info.LoggingDriver)
|
||||
ioutils.FprintfIfNotEmpty(cli.out, "Kernel Version: %s\n", info.KernelVersion)
|
||||
ioutils.FprintfIfNotEmpty(cli.out, "Operating System: %s\n", info.OperatingSystem)
|
||||
ioutils.FprintfIfNotEmpty(cli.out, "OSType: %s\n", info.OSType)
|
||||
ioutils.FprintfIfNotEmpty(cli.out, "Architecture: %s\n", info.Architecture)
|
||||
fmt.Fprintf(cli.out, "CPUs: %d\n", info.NCPU)
|
||||
fmt.Fprintf(cli.out, "Total Memory: %s\n", units.BytesSize(float64(info.MemTotal)))
|
||||
ioutils.FprintfIfNotEmpty(cli.out, "Name: %s\n", info.Name)
|
||||
|
|
|
@ -207,6 +207,8 @@ type Info struct {
|
|||
NEventsListener int
|
||||
KernelVersion string
|
||||
OperatingSystem string
|
||||
OSType string
|
||||
Architecture string
|
||||
IndexServerAddress string
|
||||
RegistryConfig *registry.ServiceConfig
|
||||
InitSha1 string
|
||||
|
|
|
@ -75,6 +75,8 @@ func (daemon *Daemon) SystemInfo() (*types.Info, error) {
|
|||
KernelVersion: kernelVersion,
|
||||
OperatingSystem: operatingSystem,
|
||||
IndexServerAddress: registry.IndexServer,
|
||||
OSType: runtime.GOOS,
|
||||
Architecture: runtime.GOARCH,
|
||||
RegistryConfig: daemon.RegistryService.Config,
|
||||
InitSha1: dockerversion.InitSHA1,
|
||||
InitPath: initPath,
|
||||
|
|
|
@ -1884,6 +1884,7 @@ Display system-wide information
|
|||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"Architecture": "amd64",
|
||||
"Containers": 11,
|
||||
"CpuCfsPeriod": true,
|
||||
"CpuCfsQuota": true,
|
||||
|
@ -1915,6 +1916,7 @@ Display system-wide information
|
|||
"Name": "prod-server-42",
|
||||
"NoProxy": "9.81.1.160",
|
||||
"OomKillDisable": true,
|
||||
"OSType": "linux",
|
||||
"OperatingSystem": "Boot2Docker",
|
||||
"RegistryConfig": {
|
||||
"IndexConfigs": {
|
||||
|
|
|
@ -31,6 +31,8 @@ For example:
|
|||
Execution Driver: native-0.2
|
||||
Logging Driver: json-file
|
||||
Kernel Version: 3.19.0-22-generic
|
||||
OSType: linux
|
||||
Architecture: amd64
|
||||
Operating System: Ubuntu 15.04
|
||||
CPUs: 24
|
||||
Total Memory: 62.86 GiB
|
||||
|
|
|
@ -23,6 +23,8 @@ func (s *DockerSuite) TestInfoApi(c *check.C) {
|
|||
"LoggingDriver",
|
||||
"OperatingSystem",
|
||||
"NCPU",
|
||||
"OSType",
|
||||
"Architecture",
|
||||
"MemTotal",
|
||||
"KernelVersion",
|
||||
"Driver",
|
||||
|
|
|
@ -19,6 +19,8 @@ func (s *DockerSuite) TestInfoEnsureSucceeds(c *check.C) {
|
|||
"Containers:",
|
||||
"Images:",
|
||||
"Execution Driver:",
|
||||
"OSType:",
|
||||
"Architecture:",
|
||||
"Logging Driver:",
|
||||
"Operating System:",
|
||||
"CPUs:",
|
||||
|
|
|
@ -41,6 +41,8 @@ Here is a sample output:
|
|||
Logging Driver: json-file
|
||||
Kernel Version: 3.13.0-24-generic
|
||||
Operating System: Ubuntu 14.04 LTS
|
||||
OSType: linux
|
||||
Architecture: amd64
|
||||
CPUs: 1
|
||||
Total Memory: 2 GiB
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue