From 0fb38659b7f87ee021d79dd9b2e2142a86c55deb Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Sat, 31 Mar 2018 20:18:03 -0400 Subject: Add container dependencies to Inspect output Signed-off-by: Matthew Heon Closes: #577 Approved by: rhatdan --- libpod/container_inspect.go | 1 + pkg/inspect/inspect.go | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go index 0fdce13c0..b3e8ebeb9 100644 --- a/libpod/container_inspect.go +++ b/libpod/container_inspect.go @@ -77,6 +77,7 @@ func (c *Container) getContainerInspectData(size bool, driverData *inspect.Data) ExecIDs: execIDs, GraphDriver: driverData, Mounts: spec.Mounts, + Dependencies: c.Dependencies(), NetworkSettings: &inspect.NetworkSettings{ Bridge: "", // TODO SandboxID: "", // TODO - is this even relevant? diff --git a/pkg/inspect/inspect.go b/pkg/inspect/inspect.go index b75fba0e1..4a7c96aa1 100644 --- a/pkg/inspect/inspect.go +++ b/pkg/inspect/inspect.go @@ -149,8 +149,8 @@ type ContainerInspectData struct { ImageID string `json:"Image"` ImageName string `json:"ImageName"` ResolvConfPath string `json:"ResolvConfPath"` - HostnamePath string `json:"HostnamePath"` //TODO - HostsPath string `json:"HostsPath"` //TODO + HostnamePath string `json:"HostnamePath"` + HostsPath string `json:"HostsPath"` StaticDir string `json:"StaticDir"` LogPath string `json:"LogPath"` Name string `json:"Name"` @@ -159,11 +159,12 @@ type ContainerInspectData struct { MountLabel string `json:"MountLabel"` ProcessLabel string `json:"ProcessLabel"` AppArmorProfile string `json:"AppArmorProfile"` - ExecIDs []string `json:"ExecIDs"` //TODO + ExecIDs []string `json:"ExecIDs"` GraphDriver *Data `json:"GraphDriver"` SizeRw int64 `json:"SizeRw,omitempty"` SizeRootFs int64 `json:"SizeRootFs,omitempty"` Mounts []specs.Mount `json:"Mounts"` + Dependencies []string `json:"Dependencies"` NetworkSettings *NetworkSettings `json:"NetworkSettings"` //TODO } -- cgit v1.2.3-54-g00ecf