summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel/volumes.go
blob: 49cf6a2f6f7d192dc34a1a439b606346e2dbc37b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
}