summaryrefslogtreecommitdiff
path: root/cmd/podmanV2/inspect.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-16 14:04:58 -0700
committerGitHub <noreply@github.com>2020-04-16 14:04:58 -0700
commit0d2b5532c417c58bd24e71a56c5c55b43e423a59 (patch)
tree4001e8e47a022bb1b9bfbf2332c42e1aeb802f9e /cmd/podmanV2/inspect.go
parent88c6fd06cd54fb9a8826306dfdf1a77e400de5de (diff)
parent241326a9a8c20ad7f2bcf651416b836e7778e090 (diff)
downloadpodman-0d2b5532c417c58bd24e71a56c5c55b43e423a59.tar.gz
podman-0d2b5532c417c58bd24e71a56c5c55b43e423a59.tar.bz2
podman-0d2b5532c417c58bd24e71a56c5c55b43e423a59.zip
Merge pull request #5852 from baude/v1prune
Podman V2 birth
Diffstat (limited to 'cmd/podmanV2/inspect.go')
-rw-r--r--cmd/podmanV2/inspect.go52
1 files changed, 0 insertions, 52 deletions
diff --git a/cmd/podmanV2/inspect.go b/cmd/podmanV2/inspect.go
deleted file mode 100644
index 25024d6f8..000000000
--- a/cmd/podmanV2/inspect.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package main
-
-import (
- "context"
- "fmt"
-
- "github.com/containers/libpod/cmd/podmanV2/common"
- "github.com/containers/libpod/cmd/podmanV2/containers"
- "github.com/containers/libpod/cmd/podmanV2/images"
- "github.com/containers/libpod/cmd/podmanV2/registry"
- "github.com/containers/libpod/pkg/domain/entities"
- "github.com/spf13/cobra"
-)
-
-// Inspect is one of the outlier commands in that it operates on images/containers/...
-
-var (
- inspectOpts *entities.InspectOptions
-
- // Command: podman _inspect_ Object_ID
- inspectCmd = &cobra.Command{
- Use: "inspect [flags] {CONTAINER_ID | IMAGE_ID}",
- Args: cobra.ExactArgs(1),
- Short: "Display the configuration of object denoted by ID",
- Long: "Displays the low-level information on an object identified by name or ID",
- TraverseChildren: true,
- RunE: inspect,
- }
-)
-
-func init() {
- registry.Commands = append(registry.Commands, registry.CliCommand{
- Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode},
- Command: inspectCmd,
- })
- inspectOpts = common.AddInspectFlagSet(inspectCmd)
-}
-
-func inspect(cmd *cobra.Command, args []string) error {
- if found, err := registry.ImageEngine().Exists(context.Background(), args[0]); err != nil {
- return err
- } else if found.Value {
- return images.Inspect(cmd, args, inspectOpts)
- }
-
- if found, err := registry.ContainerEngine().ContainerExists(context.Background(), args[0]); err != nil {
- return err
- } else if found.Value {
- return containers.Inspect(cmd, args, inspectOpts)
- }
- return fmt.Errorf("%s not found on system", args[0])
-}