summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-03-20 12:37:37 -0500
committerBrent Baude <bbaude@redhat.com>2020-03-20 18:27:08 -0500
commitc3a9ff11743c1ee25515ced348ec635fb7703aa0 (patch)
tree380dedfa9ffb337ebe197b15c218b3a1bfc627b6 /pkg/domain/infra/tunnel
parent7a095af92a6a39845b1c362222b23632f3e17001 (diff)
downloadpodman-c3a9ff11743c1ee25515ced348ec635fb7703aa0.tar.gz
podman-c3a9ff11743c1ee25515ced348ec635fb7703aa0.tar.bz2
podman-c3a9ff11743c1ee25515ced348ec635fb7703aa0.zip
podmanv2 volume create
add volume create Signed-off-by: Brent Baude <bbaude@redhat.com>
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
+}