Browse code

Adding SystemStatus field for /info endpoint

Signed-off-by: Nishant Totla <nishanttotla@gmail.com>

Nishant Totla authored on 2016/01/25 06:30:21
Showing 4 changed files
... ...
@@ -42,6 +42,11 @@ func (cli *DockerCli) CmdInfo(args ...string) error {
42 42
 		}
43 43
 
44 44
 	}
45
+	if info.SystemStatus != nil {
46
+		for _, pair := range info.SystemStatus {
47
+			fmt.Fprintf(cli.out, "%s: %s\n", pair[0], pair[1])
48
+		}
49
+	}
45 50
 	ioutils.FprintfIfNotEmpty(cli.out, "Execution Driver: %s\n", info.ExecutionDriver)
46 51
 	ioutils.FprintfIfNotEmpty(cli.out, "Logging Driver: %s\n", info.LoggingDriver)
47 52
 
... ...
@@ -128,6 +128,8 @@ This section lists each version from latest to oldest.  Each listing includes a
128 128
 * `GET /networks/{network-id}` Now returns IPAM config options for custom IPAM plugins if any
129 129
   are available.
130 130
 * `GET /networks/<network-id>` now returns subnets info for user-defined networks.
131
+* `GET /info` can now return a `SystemStatus` field useful for returning additional information about applications
132
+  that are built on top of engine.
131 133
 
132 134
 ### v1.21 API changes
133 135
 
... ...
@@ -2102,6 +2102,7 @@ Display system-wide information
2102 2102
         "DockerRootDir": "/var/lib/docker",
2103 2103
         "Driver": "btrfs",
2104 2104
         "DriverStatus": [[""]],
2105
+        "SystemStatus": [["State", "Healthy"]],
2105 2106
         "Plugins": {
2106 2107
             "Volume": [
2107 2108
                 "local"
... ...
@@ -2102,6 +2102,7 @@ Display system-wide information
2102 2102
         "DockerRootDir": "/var/lib/docker",
2103 2103
         "Driver": "btrfs",
2104 2104
         "DriverStatus": [[""]],
2105
+        "SystemStatus": [["State", "Healthy"]],
2105 2106
         "Plugins": {
2106 2107
             "Volume": [
2107 2108
                 "local"