From c3a9ff11743c1ee25515ced348ec635fb7703aa0 Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Fri, 20 Mar 2020 12:37:37 -0500 Subject: podmanv2 volume create add volume create Signed-off-by: Brent Baude --- pkg/domain/infra/tunnel/volumes.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pkg/domain/infra/tunnel/volumes.go (limited to 'pkg/domain/infra/tunnel') 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 +} -- cgit v1.2.3-54-g00ecf