diff options
Diffstat (limited to 'pkg/adapter')
-rw-r--r-- | pkg/adapter/runtime.go | 6 | ||||
-rw-r--r-- | pkg/adapter/runtime_remote.go | 9 |
2 files changed, 10 insertions, 5 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 } diff --git a/pkg/adapter/runtime_remote.go b/pkg/adapter/runtime_remote.go index 718a6d542..f079b914a 100644 --- a/pkg/adapter/runtime_remote.go +++ b/pkg/adapter/runtime_remote.go @@ -622,13 +622,18 @@ func (r *LocalRuntime) CreateVolume(ctx context.Context, c *cliconfig.VolumeCrea } // RemoveVolumes removes volumes over a varlink connection for the remote client -func (r *LocalRuntime) RemoveVolumes(ctx context.Context, c *cliconfig.VolumeRmValues) ([]string, error) { +func (r *LocalRuntime) RemoveVolumes(ctx context.Context, c *cliconfig.VolumeRmValues) ([]string, map[string]error, error) { rmOpts := iopodman.VolumeRemoveOpts{ All: c.All, Force: c.Force, Volumes: c.InputArgs, } - return iopodman.VolumeRemove().Call(r.Conn, rmOpts) + success, failures, err := iopodman.VolumeRemove().Call(r.Conn, rmOpts) + stringsToErrors := make(map[string]error) + for k, v := range failures { + stringsToErrors[k] = errors.New(v) + } + return success, stringsToErrors, err } func (r *LocalRuntime) Push(ctx context.Context, srcName, destination, manifestMIMEType, authfile, digestfile, signaturePolicyPath string, writer io.Writer, forceCompress bool, signingOptions image.SigningOptions, dockerRegistryOptions *image.DockerRegistryOptions, additionalDockerArchiveTags []reference.NamedTagged) error { |