Browse Source

Adding SystemStatus field for /info endpoint

Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Nishant Totla 9 years ago
parent
commit
c2119a9c00

+ 5 - 0
api/client/info.go

@@ -42,6 +42,11 @@ func (cli *DockerCli) CmdInfo(args ...string) error {
 		}
 		}
 
 
 	}
 	}
+	if info.SystemStatus != nil {
+		for _, pair := range info.SystemStatus {
+			fmt.Fprintf(cli.out, "%s: %s\n", pair[0], pair[1])
+		}
+	}
 	ioutils.FprintfIfNotEmpty(cli.out, "Execution Driver: %s\n", info.ExecutionDriver)
 	ioutils.FprintfIfNotEmpty(cli.out, "Execution Driver: %s\n", info.ExecutionDriver)
 	ioutils.FprintfIfNotEmpty(cli.out, "Logging Driver: %s\n", info.LoggingDriver)
 	ioutils.FprintfIfNotEmpty(cli.out, "Logging Driver: %s\n", info.LoggingDriver)
 
 

+ 2 - 0
docs/reference/api/docker_remote_api.md

@@ -122,6 +122,8 @@ This section lists each version from latest to oldest.  Each listing includes a
 * `GET /networks/{network-id}` Now returns IPAM config options for custom IPAM plugins if any
 * `GET /networks/{network-id}` Now returns IPAM config options for custom IPAM plugins if any
   are available.
   are available.
 * `GET /networks/<network-id>` now returns subnets info for user-defined networks.
 * `GET /networks/<network-id>` now returns subnets info for user-defined networks.
+* `GET /info` can now return a `SystemStatus` field useful for returning additional information about applications
+  that are built on top of engine.
 
 
 ### v1.21 API changes
 ### v1.21 API changes
 
 

+ 1 - 0
docs/reference/api/docker_remote_api_v1.22.md

@@ -2102,6 +2102,7 @@ Display system-wide information
         "DockerRootDir": "/var/lib/docker",
         "DockerRootDir": "/var/lib/docker",
         "Driver": "btrfs",
         "Driver": "btrfs",
         "DriverStatus": [[""]],
         "DriverStatus": [[""]],
+        "SystemStatus": [["State", "Healthy"]],
         "Plugins": {
         "Plugins": {
             "Volume": [
             "Volume": [
                 "local"
                 "local"