summaryrefslogtreecommitdiff
path: root/libpod/adapter/runtime_remote.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-02-12 02:54:34 +0100
committerGitHub <noreply@github.com>2019-02-12 02:54:34 +0100
commitea20ead35b69b1259f2ff3b00f558c473a921b95 (patch)
tree9a7e3faba300608db3dd2ee24fbaf02ebf9e66a3 /libpod/adapter/runtime_remote.go
parent54a5584d84d37632c1c8480d437a012625526a84 (diff)
parent358da6c8c0375ad41c4669aeef71f9626710c83e (diff)
downloadpodman-ea20ead35b69b1259f2ff3b00f558c473a921b95.tar.gz
podman-ea20ead35b69b1259f2ff3b00f558c473a921b95.tar.bz2
podman-ea20ead35b69b1259f2ff3b00f558c473a921b95.zip
Merge pull request #2313 from baude/remotevolumecreate
podman-remote volume create
Diffstat (limited to 'libpod/adapter/runtime_remote.go')
-rw-r--r--libpod/adapter/runtime_remote.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/libpod/adapter/runtime_remote.go b/libpod/adapter/runtime_remote.go
index f754aaee6..3df8afc6e 100644
--- a/libpod/adapter/runtime_remote.go
+++ b/libpod/adapter/runtime_remote.go
@@ -432,3 +432,20 @@ func (r *LocalRuntime) GetContainers(filters ...libpod.ContainerFilter) ([]*libp
func (r *LocalRuntime) RemoveContainer(ctx context.Context, c *libpod.Container, force bool) error {
return libpod.ErrNotImplemented
}
+
+// CreateVolume creates a volume over a varlink connection for the remote client
+func (r *LocalRuntime) CreateVolume(ctx context.Context, c *cliconfig.VolumeCreateValues, labels, opts map[string]string) (string, error) {
+ cvOpts := iopodman.VolumeCreateOpts{
+ Options: opts,
+ Labels: labels,
+ }
+ if len(c.InputArgs) > 0 {
+ cvOpts.VolumeName = c.InputArgs[0]
+ }
+
+ if c.Flag("driver").Changed {
+ cvOpts.Driver = c.Driver
+ }
+
+ return iopodman.VolumeCreate().Call(r.Conn, cvOpts)
+}