Merge pull request #834 from mrunalp/inspect_add_sandbox

server: Add sandbox to container info
This commit is contained in:
Antonio Murdaca 2017-09-01 22:41:07 +02:00 committed by GitHub
commit 8538c4067a

View file

@ -18,6 +18,7 @@ type ContainerInfo struct {
Annotations map[string]string `json:"annotations"` Annotations map[string]string `json:"annotations"`
LogPath string `json:"log_path"` LogPath string `json:"log_path"`
Root string `json:"root"` Root string `json:"root"`
Sandbox string `json:"sandbox"`
} }
// CrioInfo stores information about the crio daemon // CrioInfo stores information about the crio daemon
@ -68,6 +69,7 @@ func (s *Server) GetInfoMux() *bone.Mux {
Annotations: ctr.Annotations(), Annotations: ctr.Annotations(),
Root: ctr.MountPoint(), Root: ctr.MountPoint(),
LogPath: filepath.Dir(ctr.LogPath()), LogPath: filepath.Dir(ctr.LogPath()),
Sandbox: ctr.Sandbox(),
} }
js, err := json.Marshal(ci) js, err := json.Marshal(ci)
if err != nil { if err != nil {