summaryrefslogtreecommitdiff
path: root/cmd/podman/container.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/podman/container.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/podman/container.go')
-rw-r--r--cmd/podman/container.go93
1 files changed, 0 insertions, 93 deletions
diff --git a/cmd/podman/container.go b/cmd/podman/container.go
deleted file mode 100644
index 66b58f06e..000000000
--- a/cmd/podman/container.go
+++ /dev/null
@@ -1,93 +0,0 @@
-package main
-
-import (
- "strings"
-
- "github.com/containers/libpod/cmd/podman/cliconfig"
- "github.com/spf13/cobra"
-)
-
-var (
- containerDescription = "Manage containers"
- containerCommand = cliconfig.PodmanCommand{
- Command: &cobra.Command{
- Use: "container",
- Short: "Manage Containers",
- Long: containerDescription,
- TraverseChildren: true,
- RunE: commandRunE(),
- },
- }
-
- contInspectSubCommand cliconfig.InspectValues
- _contInspectSubCommand = &cobra.Command{
- Use: strings.Replace(_inspectCommand.Use, "| IMAGE", "", 1),
- Short: "Display the configuration of a container",
- Long: `Displays the low-level information on a container identified by name or ID.`,
- RunE: func(cmd *cobra.Command, args []string) error {
- contInspectSubCommand.InputArgs = args
- contInspectSubCommand.GlobalFlags = MainGlobalOpts
- return inspectCmd(&contInspectSubCommand)
- },
- Example: `podman container inspect myCtr
- podman container inspect -l --format '{{.Id}} {{.Config.Labels}}'`,
- }
-
- listSubCommand cliconfig.PsValues
- _listSubCommand = &cobra.Command{
- Use: strings.Replace(_psCommand.Use, "ps", "list", 1),
- Args: noSubArgs,
- Short: _psCommand.Short,
- Long: _psCommand.Long,
- Aliases: []string{"ls"},
- RunE: func(cmd *cobra.Command, args []string) error {
- listSubCommand.InputArgs = args
- listSubCommand.GlobalFlags = MainGlobalOpts
- return psCmd(&listSubCommand)
- },
- Example: strings.Replace(_psCommand.Example, "podman ps", "podman container list", -1),
- }
-
- // Commands that are universally implemented.
- containerCommands = []*cobra.Command{
- _attachCommand,
- _checkpointCommand,
- _commitCommand,
- _containerExistsCommand,
- _contInspectSubCommand,
- _diffCommand,
- _execCommand,
- _exportCommand,
- _createCommand,
- _initCommand,
- _killCommand,
- _listSubCommand,
- _logsCommand,
- _pauseCommand,
- _portCommand,
- _pruneContainersCommand,
- _restartCommand,
- _restoreCommand,
- _runCommand,
- _rmCommand,
- _startCommand,
- _stopCommand,
- _topCommand,
- _unpauseCommand,
- _waitCommand,
- }
-)
-
-func init() {
- contInspectSubCommand.Command = _contInspectSubCommand
- inspectInit(&contInspectSubCommand)
-
- listSubCommand.Command = _listSubCommand
- psInit(&listSubCommand)
-
- containerCommand.AddCommand(containerCommands...)
- containerCommand.AddCommand(getContainerSubCommands()...)
- containerCommand.SetUsageTemplate(UsageTemplate())
-
- rootCmd.AddCommand(containerCommand.Command)
-}