summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-21 14:46:39 +0100
committerGitHub <noreply@github.com>2020-03-21 14:46:39 +0100
commit195a82ffbc435716ef5bb69f6eefa333abe3f840 (patch)
tree5d37dc8abce399a4bad65eb7eb81614ce63a63cc /pkg/domain/infra/tunnel
parente1f2851976fb66b92779fcb45a2ae2117923ca4e (diff)
parentc3a9ff11743c1ee25515ced348ec635fb7703aa0 (diff)
downloadpodman-195a82ffbc435716ef5bb69f6eefa333abe3f840.tar.gz
podman-195a82ffbc435716ef5bb69f6eefa333abe3f840.tar.bz2
podman-195a82ffbc435716ef5bb69f6eefa333abe3f840.zip
Merge pull request #5577 from baude/v2volumecreate
podmanv2 volume create
Diffstat (limited to 'pkg/domain/infra/tunnel')
-rw-r--r--pkg/domain/infra/tunnel/volumes.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/domain/infra/tunnel/volumes.go b/pkg/domain/infra/tunnel/volumes.go
new file mode 100644
index 000000000..49cf6a2f6
--- /dev/null
+++ b/pkg/domain/infra/tunnel/volumes.go
@@ -0,0 +1,16 @@
+package tunnel
+
+import (
+ "context"
+
+ "github.com/containers/libpod/pkg/bindings/volumes"
+ "github.com/containers/libpod/pkg/domain/entities"
+)
+
+func (ic *ContainerEngine) VolumeCreate(ctx context.Context, opts entities.VolumeCreateOptions) (*entities.IdOrNameResponse, error) {
+ response, err := volumes.Create(ic.ClientCxt, opts)
+ if err != nil {
+ return nil, err
+ }
+ return &entities.IdOrNameResponse{IdOrName: response.Name}, nil
+}