diff options
author | Nalin Dahyabhai <nalin@redhat.com> | 2019-04-22 16:41:17 -0400 |
---|---|---|
committer | Nalin Dahyabhai <nalin@redhat.com> | 2019-04-25 08:57:58 -0400 |
commit | 5c81a117f16fde190acef331f5b88022fe11c550 (patch) | |
tree | a8aa0f3baaf59bf05e10479abc5a1d89206a0e80 /pkg/adapter | |
parent | b01fdcbbd5344e89c3d9f3462c1df1764277d9fd (diff) | |
download | podman-5c81a117f16fde190acef331f5b88022fe11c550.tar.gz podman-5c81a117f16fde190acef331f5b88022fe11c550.tar.bz2 podman-5c81a117f16fde190acef331f5b88022fe11c550.zip |
images: add context to GetParent/IsParent/Remove/Prune...
Add a context.Context parameter to Image.GetParent(), Image.IsParent(),
Image.GetChildren(), Image.Remove(), and Runtime.PruneImages().
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Diffstat (limited to 'pkg/adapter')
-rw-r--r-- | pkg/adapter/runtime.go | 4 | ||||
-rw-r--r-- | pkg/adapter/runtime_remote.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/pkg/adapter/runtime.go b/pkg/adapter/runtime.go index 753f7c944..ca9678265 100644 --- a/pkg/adapter/runtime.go +++ b/pkg/adapter/runtime.go @@ -119,8 +119,8 @@ func (r *LocalRuntime) RemoveImage(ctx context.Context, img *ContainerImage, for } // PruneImages is wrapper into PruneImages within the image pkg -func (r *LocalRuntime) PruneImages(all bool) ([]string, error) { - return r.ImageRuntime().PruneImages(all) +func (r *LocalRuntime) PruneImages(ctx context.Context, all bool) ([]string, error) { + return r.ImageRuntime().PruneImages(ctx, all) } // Export is a wrapper to container export to a tarfile diff --git a/pkg/adapter/runtime_remote.go b/pkg/adapter/runtime_remote.go index dcb0924ce..29ee821e0 100644 --- a/pkg/adapter/runtime_remote.go +++ b/pkg/adapter/runtime_remote.go @@ -256,7 +256,7 @@ func (r *LocalRuntime) New(ctx context.Context, name, signaturePolicyPath, authf // IsParent goes through the layers in the store and checks if i.TopLayer is // the parent of any other layer in store. Double check that image with that // layer exists as well. -func (ci *ContainerImage) IsParent() (bool, error) { +func (ci *ContainerImage) IsParent(context.Context) (bool, error) { return ci.remoteImage.isParent, nil } @@ -338,7 +338,7 @@ func (ci *ContainerImage) History(ctx context.Context) ([]*image.History, error) } // PruneImages is the wrapper call for a remote-client to prune images -func (r *LocalRuntime) PruneImages(all bool) ([]string, error) { +func (r *LocalRuntime) PruneImages(ctx context.Context, all bool) ([]string, error) { return iopodman.ImagesPrune().Call(r.Conn, all) } |