From 7b510fda0cd6d633501b3e999e16bd98ce89dea3 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 18 Jul 2022 11:21:34 +0200 Subject: [PATCH 1/2] daemon: ImageService: remove unused Map() method Signed-off-by: Sebastiaan van Stijn --- daemon/containerd/service.go | 5 ----- daemon/image_service.go | 1 - daemon/images/images.go | 5 ----- 3 files changed, 11 deletions(-) diff --git a/daemon/containerd/service.go b/daemon/containerd/service.go index 1d841976b3..52f590ec93 100644 --- a/daemon/containerd/service.go +++ b/daemon/containerd/service.go @@ -113,11 +113,6 @@ func (cs *ImageService) GetLayerFolders(img *image.Image, rwLayer layer.RWLayer) panic("not implemented") } -// Map returns a map of all images in the ImageStore. -func (cs *ImageService) Map() map[image.ID]*image.Image { - panic("not implemented") -} - // GetLayerByID returns a layer by ID // called from daemon.go Daemon.restore(), and Daemon.containerExport(). func (cs *ImageService) GetLayerByID(string) (layer.RWLayer, error) { diff --git a/daemon/image_service.go b/daemon/image_service.go index 48842b47bd..032a9977e5 100644 --- a/daemon/image_service.go +++ b/daemon/image_service.go @@ -68,7 +68,6 @@ type ImageService interface { // Other GetRepository(ctx context.Context, ref reference.Named, authConfig *types.AuthConfig) (distribution.Repository, error) - Map() map[image.ID]*image.Image SearchRegistryForImages(ctx context.Context, searchFilters filters.Args, term string, limit int, authConfig *types.AuthConfig, headers map[string][]string) (*registry.SearchResults, error) DistributionServices() images.DistributionServices Children(id image.ID) []image.ID diff --git a/daemon/images/images.go b/daemon/images/images.go index 7f61c98013..53dfa02b71 100644 --- a/daemon/images/images.go +++ b/daemon/images/images.go @@ -33,11 +33,6 @@ func (r byCreated) Len() int { return len(r) } func (r byCreated) Swap(i, j int) { r[i], r[j] = r[j], r[i] } func (r byCreated) Less(i, j int) bool { return r[i].Created < r[j].Created } -// Map returns a map of all images in the ImageStore -func (i *ImageService) Map() map[image.ID]*image.Image { - return i.imageStore.Map() -} - // Images returns a filtered list of images. func (i *ImageService) Images(_ context.Context, opts types.ImageListOptions) ([]*types.ImageSummary, error) { if err := opts.Filters.Validate(acceptedImageFilterTags); err != nil { From 2527e6dd096517b2979c699933e73d5a1bedf74c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 18 Jul 2022 12:22:12 +0200 Subject: [PATCH 2/2] daemon/containerd: ImageService: remove unused LookupImage() Looks like this method was not part of the interface, and is not used anywhere. Signed-off-by: Sebastiaan van Stijn --- daemon/containerd/service.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/daemon/containerd/service.go b/daemon/containerd/service.go index 52f590ec93..199a2395d5 100644 --- a/daemon/containerd/service.go +++ b/daemon/containerd/service.go @@ -259,11 +259,6 @@ func (cs *ImageService) LoadImage(inTar io.ReadCloser, outStream io.Writer, quie panic("not implemented") } -// LookupImage is not implemented. -func (cs *ImageService) LookupImage(ctx context.Context, name string) (*types.ImageInspect, error) { - panic("not implemented") -} - // PushImage initiates a push operation on the repository named localName. func (cs *ImageService) PushImage(ctx context.Context, image, tag string, metaHeaders map[string][]string, authConfig *types.AuthConfig, outStream io.Writer) error { panic("not implemented")