From 3101364a3cf00a2b2562bc2510262c3ee992bbab Mon Sep 17 00:00:00 2001 From: baude Date: Sun, 10 Feb 2019 19:34:36 -0600 Subject: podman-remote volume rm add the ability to remove/delete volumes with the podman remote client. Signed-off-by: baude --- pkg/varlinkapi/volumes.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pkg/varlinkapi/volumes.go') 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) +} -- cgit v1.2.3-54-g00ecf