aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-02-10 19:34:36 -0600
committerbaude <bbaude@redhat.com>2019-02-11 20:14:50 -0600
commit3101364a3cf00a2b2562bc2510262c3ee992bbab (patch)
treeb4515ae1d155cbdca401f1f7be56cbb62476ec6d /pkg
parentea20ead35b69b1259f2ff3b00f558c473a921b95 (diff)
downloadpodman-3101364a3cf00a2b2562bc2510262c3ee992bbab.tar.gz
podman-3101364a3cf00a2b2562bc2510262c3ee992bbab.tar.bz2
podman-3101364a3cf00a2b2562bc2510262c3ee992bbab.zip
podman-remote volume rm
add the ability to remove/delete volumes with the podman remote client. Signed-off-by: baude <bbaude@redhat.com>
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)
+}