diff options
author | baude <bbaude@redhat.com> | 2020-12-14 11:33:25 -0600 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2020-12-17 09:40:51 -0600 |
commit | 86335aa4ae01dadecd36468409d742e68b76925d (patch) | |
tree | fd6e5bfeb924db9020073685d0133b2fa38622c1 /pkg/domain/infra/tunnel/volumes.go | |
parent | c38ae47a1adf3235d8b01d724e7327e608dd8078 (diff) | |
download | podman-86335aa4ae01dadecd36468409d742e68b76925d.tar.gz podman-86335aa4ae01dadecd36468409d742e68b76925d.tar.bz2 podman-86335aa4ae01dadecd36468409d742e68b76925d.zip |
misc bindings to podman v3
manifest, system, info, volumes, play, and generate bindings are
updated to always have binding options.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel/volumes.go')
-rw-r--r-- | pkg/domain/infra/tunnel/volumes.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pkg/domain/infra/tunnel/volumes.go b/pkg/domain/infra/tunnel/volumes.go index b431fc8bd..9f8aa6356 100644 --- a/pkg/domain/infra/tunnel/volumes.go +++ b/pkg/domain/infra/tunnel/volumes.go @@ -9,7 +9,7 @@ import ( ) func (ic *ContainerEngine) VolumeCreate(ctx context.Context, opts entities.VolumeCreateOptions) (*entities.IDOrNameResponse, error) { - response, err := volumes.Create(ic.ClientCxt, opts) + response, err := volumes.Create(ic.ClientCxt, opts, nil) if err != nil { return nil, err } @@ -28,8 +28,9 @@ func (ic *ContainerEngine) VolumeRm(ctx context.Context, namesOrIds []string, op } reports := make([]*entities.VolumeRmReport, 0, len(namesOrIds)) for _, id := range namesOrIds { + options := new(volumes.RemoveOptions).WithForce(opts.Force) reports = append(reports, &entities.VolumeRmReport{ - Err: volumes.Remove(ic.ClientCxt, id, &opts.Force), + Err: volumes.Remove(ic.ClientCxt, id, options), Id: id, }) } @@ -51,7 +52,7 @@ func (ic *ContainerEngine) VolumeInspect(ctx context.Context, namesOrIds []strin } } for _, id := range namesOrIds { - data, err := volumes.Inspect(ic.ClientCxt, id) + data, err := volumes.Inspect(ic.ClientCxt, id, nil) if err != nil { errModel, ok := err.(entities.ErrorModel) if !ok { @@ -69,9 +70,11 @@ func (ic *ContainerEngine) VolumeInspect(ctx context.Context, namesOrIds []strin } func (ic *ContainerEngine) VolumePrune(ctx context.Context, opts entities.VolumePruneOptions) ([]*entities.VolumePruneReport, error) { - return volumes.Prune(ic.ClientCxt, (map[string][]string)(opts.Filters)) + options := new(volumes.PruneOptions).WithFilters(opts.Filters) + return volumes.Prune(ic.ClientCxt, options) } func (ic *ContainerEngine) VolumeList(ctx context.Context, opts entities.VolumeListOptions) ([]*entities.VolumeListReport, error) { - return volumes.List(ic.ClientCxt, opts.Filter) + options := new(volumes.ListOptions).WithFilters(opts.Filter) + return volumes.List(ic.ClientCxt, options) } |