summaryrefslogtreecommitdiff
path: root/libpod/adapter
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 /libpod/adapter
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 'libpod/adapter')
-rw-r--r--libpod/adapter/runtime.go5
-rw-r--r--libpod/adapter/runtime_remote.go10
2 files changed, 15 insertions, 0 deletions
diff --git a/libpod/adapter/runtime.go b/libpod/adapter/runtime.go
index 050ea6ed4..2b1ddb09d 100644
--- a/libpod/adapter/runtime.go
+++ b/libpod/adapter/runtime.go
@@ -185,3 +185,8 @@ func (r *LocalRuntime) CreateVolume(ctx context.Context, c *cliconfig.VolumeCrea
}
return newVolume.Name(), nil
}
+
+// RemoveVolumes is a wrapper to remove volumes
+func (r *LocalRuntime) RemoveVolumes(ctx context.Context, c *cliconfig.VolumeRmValues) ([]string, error) {
+ return r.Runtime.RemoveVolumes(ctx, c.InputArgs, c.All, c.Force)
+}
diff --git a/libpod/adapter/runtime_remote.go b/libpod/adapter/runtime_remote.go
index 3df8afc6e..4dfae34e1 100644
--- a/libpod/adapter/runtime_remote.go
+++ b/libpod/adapter/runtime_remote.go
@@ -449,3 +449,13 @@ func (r *LocalRuntime) CreateVolume(ctx context.Context, c *cliconfig.VolumeCrea
return iopodman.VolumeCreate().Call(r.Conn, cvOpts)
}
+
+// RemoveVolumes removes volumes over a varlink connection for the remote client
+func (r *LocalRuntime) RemoveVolumes(ctx context.Context, c *cliconfig.VolumeRmValues) ([]string, error) {
+ rmOpts := iopodman.VolumeRemoveOpts{
+ All: c.All,
+ Force: c.Force,
+ Volumes: c.InputArgs,
+ }
+ return iopodman.VolumeRemove().Call(r.Conn, rmOpts)
+}