From 576a80b0d75182a5ae12985c47bd31da72a51bc8 Mon Sep 17 00:00:00 2001 From: baude Date: Mon, 1 Apr 2019 12:50:08 -0500 Subject: add remote-client diff the remote client now can run the diff command to report changes, modifications, and deletions in an image or container. Signed-off-by: baude --- pkg/varlinkapi/images.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'pkg/varlinkapi') diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go index 0ca867410..63d500204 100644 --- a/pkg/varlinkapi/images.go +++ b/pkg/varlinkapi/images.go @@ -910,3 +910,16 @@ func (i *LibpodAPI) LoadImage(call iopodman.VarlinkCall, name, inputFile string, } return call.ReplyLoadImage(br) } + +// Diff ... +func (i *LibpodAPI) Diff(call iopodman.VarlinkCall, name string) error { + var response []iopodman.DiffInfo + changes, err := i.Runtime.GetDiff("", name) + if err != nil { + return call.ReplyErrorOccurred(err.Error()) + } + for _, change := range changes { + response = append(response, iopodman.DiffInfo{Path: change.Path, ChangeType: change.Kind.String()}) + } + return call.ReplyDiff(response) +} -- cgit v1.2.3-54-g00ecf