diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-02-12 13:37:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-12 13:37:22 +0100 |
commit | faafdcf1f3509aeb83fd43729fa7c40ea360a3ea (patch) | |
tree | 3d12c6a2f9b3e4c44b8db4aa8e9f51c15575afad /pkg/varlinkapi | |
parent | 89237033fd38d91308ff7e5b9511aff41f44e0e8 (diff) | |
parent | 3101364a3cf00a2b2562bc2510262c3ee992bbab (diff) | |
download | podman-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/varlinkapi')
-rw-r--r-- | pkg/varlinkapi/volumes.go | 9 |
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) +} |