return all inspect info for varlink containerinspect

when obtaining the inspect information for a container through varlink, we need
to extract more container related information by parsing the data through the
method 'GetCtrInspectInfo' which was previously only in podman's main.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #866
Approved by: rhatdan
This commit is contained in:
baude
2018-05-31 17:11:50 -05:00
committed by Atomic Bot
parent 34886a79d6
commit 8f14f966be
3 changed files with 160 additions and 154 deletions

View File

@ -81,7 +81,11 @@ func (i *LibpodAPI) InspectContainer(call ioprojectatomicpodman.VarlinkCall, nam
if err != nil {
return call.ReplyErrorOccurred(err.Error())
}
b, err := json.Marshal(inspectInfo)
data, err := batchcontainer.GetCtrInspectInfo(ctr, inspectInfo)
if err != nil {
return call.ReplyErrorOccurred(err.Error())
}
b, err := json.Marshal(data)
if err != nil {
return call.ReplyErrorOccurred(fmt.Sprintf("unable to serialize"))
}