diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-05-05 15:57:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-05 15:57:08 +0200 |
commit | 4a1331d0afd9a21ff9465916d4006ff7297ae07c (patch) | |
tree | 97b56fc4361ed81c84dff9e07d46abf302670f1b /cmd/podman/system/info.go | |
parent | c313eec620becf710af925c02b7e5dfd80bd9ba6 (diff) | |
parent | 6ed3b8841f00d2aa1f86678c079a119e027b0d66 (diff) | |
download | podman-4a1331d0afd9a21ff9465916d4006ff7297ae07c.tar.gz podman-4a1331d0afd9a21ff9465916d4006ff7297ae07c.tar.bz2 podman-4a1331d0afd9a21ff9465916d4006ff7297ae07c.zip |
Merge pull request #6077 from rhatdan/v2
Fix errors found when comparing podman v1 --help versus V2
Diffstat (limited to 'cmd/podman/system/info.go')
-rw-r--r-- | cmd/podman/system/info.go | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/cmd/podman/system/info.go b/cmd/podman/system/info.go index 26be794c5..dad63bcd4 100644 --- a/cmd/podman/system/info.go +++ b/cmd/podman/system/info.go @@ -10,6 +10,7 @@ import ( "github.com/containers/libpod/pkg/domain/entities" "github.com/ghodss/yaml" "github.com/spf13/cobra" + "github.com/spf13/pflag" ) var ( @@ -25,6 +26,15 @@ var ( RunE: info, Example: `podman info`, } + + systemInfoCommand = &cobra.Command{ + Args: infoCommand.Args, + Use: infoCommand.Use, + Short: infoCommand.Short, + Long: infoCommand.Long, + RunE: infoCommand.RunE, + Example: `podman system info`, + } ) var ( @@ -37,7 +47,17 @@ func init() { Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode}, Command: infoCommand, }) - flags := infoCommand.Flags() + infoFlags(infoCommand.Flags()) + + registry.Commands = append(registry.Commands, registry.CliCommand{ + Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode}, + Command: systemInfoCommand, + Parent: systemCmd, + }) + infoFlags(systemInfoCommand.Flags()) +} + +func infoFlags(flags *pflag.FlagSet) { flags.BoolVarP(&debug, "debug", "D", false, "Display additional debug information") flags.StringVarP(&inFormat, "format", "f", "", "Change the output format to JSON or a Go template") } |