aboutsummaryrefslogtreecommitdiff
path: root/pkg/varlinkapi
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-04-01 12:50:08 -0500
committerbaude <bbaude@redhat.com>2019-04-03 09:52:38 -0500
commit576a80b0d75182a5ae12985c47bd31da72a51bc8 (patch)
treee4959ed98be60b3c0b4b64066febc3882f214af1 /pkg/varlinkapi
parent2ad5f5cc25844d0723116149b42e04ab310269f4 (diff)
downloadpodman-576a80b0d75182a5ae12985c47bd31da72a51bc8.tar.gz
podman-576a80b0d75182a5ae12985c47bd31da72a51bc8.tar.bz2
podman-576a80b0d75182a5ae12985c47bd31da72a51bc8.zip
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 <bbaude@redhat.com>
Diffstat (limited to 'pkg/varlinkapi')
-rw-r--r--pkg/varlinkapi/images.go13
1 files changed, 13 insertions, 0 deletions
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)
+}