diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-08-27 15:25:54 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-09-09 12:06:10 -0400 |
commit | 046178e55f72ed9db7cf5898d3be91b0112ab94f (patch) | |
tree | ad844579a48f043d1959233ca881307801f79a45 /pkg/adapter/runtime.go | |
parent | 16a70490852fdaf3ea5aeea6b2be19dd70fbf1c7 (diff) | |
download | podman-046178e55f72ed9db7cf5898d3be91b0112ab94f.tar.gz podman-046178e55f72ed9db7cf5898d3be91b0112ab94f.tar.bz2 podman-046178e55f72ed9db7cf5898d3be91b0112ab94f.zip |
Add function for looking up volumes by partial name
This isn't included in Docker, but seems handy enough.
Use the new API for 'volume rm' and 'volume inspect'.
Fixes #3891
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'pkg/adapter/runtime.go')
-rw-r--r-- | pkg/adapter/runtime.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/adapter/runtime.go b/pkg/adapter/runtime.go index dd15e1d15..fd6587505 100644 --- a/pkg/adapter/runtime.go +++ b/pkg/adapter/runtime.go @@ -196,8 +196,8 @@ func (r *LocalRuntime) CreateVolume(ctx context.Context, c *cliconfig.VolumeCrea } // RemoveVolumes is a wrapper to remove volumes -func (r *LocalRuntime) RemoveVolumes(ctx context.Context, c *cliconfig.VolumeRmValues) ([]string, error) { - return r.Runtime.RemoveVolumes(ctx, c.InputArgs, c.All, c.Force) +func (r *LocalRuntime) RemoveVolumes(ctx context.Context, c *cliconfig.VolumeRmValues) ([]string, map[string]error, error) { + return shared.SharedRemoveVolumes(ctx, r.Runtime, c.InputArgs, c.All, c.Force) } // Push is a wrapper to push an image to a registry @@ -220,7 +220,7 @@ func (r *LocalRuntime) InspectVolumes(ctx context.Context, c *cliconfig.VolumeIn volumes, err = r.GetAllVolumes() } else { for _, v := range c.InputArgs { - vol, err := r.GetVolume(v) + vol, err := r.LookupVolume(v) if err != nil { return nil, err } |