remove 2 warnings in docker info

Signed-off-by: Victor Vieux <victorvieux@gmail.com>
This commit is contained in:
Victor Vieux
2015-06-30 15:20:44 -07:00
parent d766fea7a8
commit 126eade4b9
3 changed files with 15 additions and 11 deletions

2
Godeps/Godeps.json generated
View File

@@ -105,7 +105,7 @@
},
{
"ImportPath": "github.com/samalba/dockerclient",
"Rev": "12570e600d71374233e5056ba315f657ced496c7"
"Rev": "661e5e686f3c69aa71ec447efd7a0d32f8dc0813"
},
{
"ImportPath": "github.com/samuel/go-zookeeper/zk",

View File

@@ -305,6 +305,8 @@ type Info struct {
MemoryLimit interface{}
SwapLimit interface{}
IPv4Forwarding interface{}
BridgeNfIptables bool
BridgeNfIp6tables bool
DockerRootDir string
HttpProxy string
HttpsProxy string

View File

@@ -25,16 +25,18 @@ const APIVERSION = "1.16"
// GET /info
func getInfo(c *context, w http.ResponseWriter, r *http.Request) {
info := dockerclient.Info{
Containers: int64(len(c.cluster.Containers())),
Images: int64(len(c.cluster.Images())),
DriverStatus: c.statusHandler.Status(),
NEventsListener: int64(c.eventsHandler.Size()),
Debug: c.debug,
MemoryLimit: true,
SwapLimit: true,
IPv4Forwarding: true,
NCPU: c.cluster.TotalCpus(),
MemTotal: c.cluster.TotalMemory(),
Containers: int64(len(c.cluster.Containers())),
Images: int64(len(c.cluster.Images())),
DriverStatus: c.statusHandler.Status(),
NEventsListener: int64(c.eventsHandler.Size()),
Debug: c.debug,
MemoryLimit: true,
SwapLimit: true,
IPv4Forwarding: true,
BridgeNfIptables: true,
BridgeNfIp6tables: true,
NCPU: c.cluster.TotalCpus(),
MemTotal: c.cluster.TotalMemory(),
}
w.Header().Set("Content-Type", "application/json")