mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-19 23:07:52 +00:00
This started as a small fix to `podman inspect` where a container and image, with the same name/tag, were present, and `podman inspect` was run on that name. `podman inspect` in 1.9 (and `docker inspect`) will give you the container; in v2.0, we gave the image. This was an easy fix (just reorder how we check for image/container). Unfortunately, in the process of testing this fix, I determined that we regressed in a different area. When you run inspect on a number of containers, some of which do not exist, `podman inspect` should return an array of inspect results for the objects that exist, then print a number of errors, one for each object that could not be found. We were bailing after the first error, and not printing output for the containers that succeeded. (For reference, this applied to images as well). This required a much more substantial set of changes to properly handle - signatures for the inspect functions in ContainerEngine and ImageEngine, plus the implementations of these interfaces, plus the actual inspect frontend code needed to be adjusted to use this. Fixes #6556 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
38 lines
2.4 KiB
Go
38 lines
2.4 KiB
Go
package entities
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/containers/common/pkg/config"
|
|
)
|
|
|
|
type ImageEngine interface {
|
|
Build(ctx context.Context, containerFiles []string, opts BuildOptions) (*BuildReport, error)
|
|
Config(ctx context.Context) (*config.Config, error)
|
|
Diff(ctx context.Context, nameOrID string, options DiffOptions) (*DiffReport, error)
|
|
Exists(ctx context.Context, nameOrID string) (*BoolReport, error)
|
|
History(ctx context.Context, nameOrID string, opts ImageHistoryOptions) (*ImageHistoryReport, error)
|
|
Import(ctx context.Context, opts ImageImportOptions) (*ImageImportReport, error)
|
|
Inspect(ctx context.Context, namesOrIDs []string, opts InspectOptions) ([]*ImageInspectReport, []error, error)
|
|
List(ctx context.Context, opts ImageListOptions) ([]*ImageSummary, error)
|
|
Load(ctx context.Context, opts ImageLoadOptions) (*ImageLoadReport, error)
|
|
Prune(ctx context.Context, opts ImagePruneOptions) (*ImagePruneReport, error)
|
|
Pull(ctx context.Context, rawImage string, opts ImagePullOptions) (*ImagePullReport, error)
|
|
Push(ctx context.Context, source string, destination string, opts ImagePushOptions) error
|
|
Remove(ctx context.Context, images []string, opts ImageRemoveOptions) (*ImageRemoveReport, []error)
|
|
Save(ctx context.Context, nameOrID string, tags []string, options ImageSaveOptions) error
|
|
Search(ctx context.Context, term string, opts ImageSearchOptions) ([]ImageSearchReport, error)
|
|
SetTrust(ctx context.Context, args []string, options SetTrustOptions) error
|
|
ShowTrust(ctx context.Context, args []string, options ShowTrustOptions) (*ShowTrustReport, error)
|
|
Shutdown(ctx context.Context)
|
|
Tag(ctx context.Context, nameOrID string, tags []string, options ImageTagOptions) error
|
|
Tree(ctx context.Context, nameOrID string, options ImageTreeOptions) (*ImageTreeReport, error)
|
|
Untag(ctx context.Context, nameOrID string, tags []string, options ImageUntagOptions) error
|
|
ManifestCreate(ctx context.Context, names, images []string, opts ManifestCreateOptions) (string, error)
|
|
ManifestInspect(ctx context.Context, name string) ([]byte, error)
|
|
ManifestAdd(ctx context.Context, opts ManifestAddOptions) (string, error)
|
|
ManifestAnnotate(ctx context.Context, names []string, opts ManifestAnnotateOptions) (string, error)
|
|
ManifestRemove(ctx context.Context, names []string) (string, error)
|
|
ManifestPush(ctx context.Context, names []string, manifestPushOpts ManifestPushOptions) error
|
|
Sign(ctx context.Context, names []string, options SignOptions) (*SignReport, error)
|
|
}
|