summaryrefslogtreecommitdiff
path: root/cmd/podman/system/info.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-05-04 10:52:29 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-05-04 14:16:34 -0400
commit6ed3b8841f00d2aa1f86678c079a119e027b0d66 (patch)
tree4befccb87c0b5e4208af4e3ed92b144d7ba45c59 /cmd/podman/system/info.go
parent01aad516e012fe46179e053addd7a8a84788228b (diff)
downloadpodman-6ed3b8841f00d2aa1f86678c079a119e027b0d66.tar.gz
podman-6ed3b8841f00d2aa1f86678c079a119e027b0d66.tar.bz2
podman-6ed3b8841f00d2aa1f86678c079a119e027b0d66.zip
Fix errors found when comparing podman v1 --help versus V2
Mainly add missing commands to podman image, podman containers, podman system Also fix some informations messages and descriptions. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/system/info.go')
-rw-r--r--cmd/podman/system/info.go22
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")
}