summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-02-12 13:37:22 +0100
committerGitHub <noreply@github.com>2019-02-12 13:37:22 +0100
commitfaafdcf1f3509aeb83fd43729fa7c40ea360a3ea (patch)
tree3d12c6a2f9b3e4c44b8db4aa8e9f51c15575afad /pkg
parent89237033fd38d91308ff7e5b9511aff41f44e0e8 (diff)
parent3101364a3cf00a2b2562bc2510262c3ee992bbab (diff)
downloadpodman-faafdcf1f3509aeb83fd43729fa7c40ea360a3ea.tar.gz
podman-faafdcf1f3509aeb83fd43729fa7c40ea360a3ea.tar.bz2
podman-faafdcf1f3509aeb83fd43729fa7c40ea360a3ea.zip
Merge pull request #2315 from baude/remotevolumerm
podman-remote volume rm
Diffstat (limited to 'pkg')
-rw-r--r--pkg/varlinkapi/volumes.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/varlinkapi/volumes.go b/pkg/varlinkapi/volumes.go
index d1e4ae3c6..ced394e90 100644
--- a/pkg/varlinkapi/volumes.go
+++ b/pkg/varlinkapi/volumes.go
@@ -27,3 +27,12 @@ func (i *LibpodAPI) VolumeCreate(call iopodman.VarlinkCall, options iopodman.Vol
}
return call.ReplyVolumeCreate(newVolume.Name())
}
+
+// VolumeRemove removes volumes by options.All or options.Volumes
+func (i *LibpodAPI) VolumeRemove(call iopodman.VarlinkCall, options iopodman.VolumeRemoveOpts) error {
+ deletedVolumes, err := i.Runtime.RemoveVolumes(getContext(), options.Volumes, options.All, options.Force)
+ if err != nil {
+ return call.ReplyErrorOccurred(err.Error())
+ }
+ return call.ReplyVolumeRemove(deletedVolumes)
+}