diff options
author | Brent Baude <bbaude@redhat.com> | 2020-04-16 12:25:26 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2020-04-16 15:53:58 -0500 |
commit | 241326a9a8c20ad7f2bcf651416b836e7778e090 (patch) | |
tree | 4001e8e47a022bb1b9bfbf2332c42e1aeb802f9e /cmd/podman/image.go | |
parent | 88c6fd06cd54fb9a8826306dfdf1a77e400de5de (diff) | |
download | podman-241326a9a8c20ad7f2bcf651416b836e7778e090.tar.gz podman-241326a9a8c20ad7f2bcf651416b836e7778e090.tar.bz2 podman-241326a9a8c20ad7f2bcf651416b836e7778e090.zip |
Podman V2 birth
remote podman v1 and replace with podman v2.
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/image.go')
-rw-r--r-- | cmd/podman/image.go | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/cmd/podman/image.go b/cmd/podman/image.go deleted file mode 100644 index ce576ff4b..000000000 --- a/cmd/podman/image.go +++ /dev/null @@ -1,94 +0,0 @@ -package main - -import ( - "strings" - - "github.com/containers/libpod/cmd/podman/cliconfig" - "github.com/spf13/cobra" -) - -var ( - imageDescription = "Manage images" - imageCommand = cliconfig.PodmanCommand{ - Command: &cobra.Command{ - Use: "image", - Short: "Manage images", - Long: imageDescription, - RunE: commandRunE(), - }, - } - imagesSubCommand cliconfig.ImagesValues - _imagesSubCommand = &cobra.Command{ - Use: strings.Replace(_imagesCommand.Use, "images", "list", 1), - Short: _imagesCommand.Short, - Long: _imagesCommand.Long, - Aliases: []string{"ls"}, - RunE: func(cmd *cobra.Command, args []string) error { - imagesSubCommand.InputArgs = args - imagesSubCommand.GlobalFlags = MainGlobalOpts - return imagesCmd(&imagesSubCommand) - }, - Example: strings.Replace(_imagesCommand.Example, "podman images", "podman image list", -1), - } - - inspectSubCommand cliconfig.InspectValues - _inspectSubCommand = &cobra.Command{ - Use: strings.Replace(_inspectCommand.Use, "CONTAINER | ", "", 1), - Short: "Display the configuration of an image", - Long: `Displays the low-level information on an image identified by name or ID.`, - RunE: func(cmd *cobra.Command, args []string) error { - inspectSubCommand.InputArgs = args - inspectSubCommand.GlobalFlags = MainGlobalOpts - return inspectCmd(&inspectSubCommand) - }, - Example: `podman image inspect alpine`, - } - - rmSubCommand cliconfig.RmiValues - _rmSubCommand = &cobra.Command{ - Use: strings.Replace(_rmiCommand.Use, "rmi", "rm", 1), - Short: _rmiCommand.Short, - Long: _rmiCommand.Long, - RunE: func(cmd *cobra.Command, args []string) error { - rmSubCommand.InputArgs = args - rmSubCommand.GlobalFlags = MainGlobalOpts - return rmiCmd(&rmSubCommand) - }, - Example: strings.Replace(_rmiCommand.Example, "podman rmi", "podman image rm", -1), - } -) - -//imageSubCommands are implemented both in local and remote clients -var imageSubCommands = []*cobra.Command{ - _buildCommand, - _historyCommand, - _imagesSubCommand, - _imageExistsCommand, - _importCommand, - _inspectSubCommand, - _loadCommand, - _pruneImagesCommand, - _pullCommand, - _pushCommand, - _rmSubCommand, - _saveCommand, - _tagCommand, - _treeCommand, - _untagCommand, -} - -func init() { - rmSubCommand.Command = _rmSubCommand - rmiInit(&rmSubCommand) - - imagesSubCommand.Command = _imagesSubCommand - imagesInit(&imagesSubCommand) - - inspectSubCommand.Command = _inspectSubCommand - inspectInit(&inspectSubCommand) - - imageCommand.SetUsageTemplate(UsageTemplate()) - imageCommand.AddCommand(imageSubCommands...) - imageCommand.AddCommand(getImageSubCommands()...) - -} |