summaryrefslogtreecommitdiff
path: root/cmd/podman/pods
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/pods')
-rw-r--r--cmd/podman/pods/create.go2
-rw-r--r--cmd/podman/pods/inspect.go7
-rw-r--r--cmd/podman/pods/kill.go2
-rw-r--r--cmd/podman/pods/pause.go2
-rw-r--r--cmd/podman/pods/prune.go2
-rw-r--r--cmd/podman/pods/ps.go7
-rw-r--r--cmd/podman/pods/restart.go2
-rw-r--r--cmd/podman/pods/rm.go2
-rw-r--r--cmd/podman/pods/start.go2
-rw-r--r--cmd/podman/pods/stats.go7
-rw-r--r--cmd/podman/pods/stop.go2
-rw-r--r--cmd/podman/pods/top.go2
-rw-r--r--cmd/podman/pods/unpause.go2
13 files changed, 19 insertions, 22 deletions
diff --git a/cmd/podman/pods/create.go b/cmd/podman/pods/create.go
index ac6d83edd..efa84dcb4 100644
--- a/cmd/podman/pods/create.go
+++ b/cmd/podman/pods/create.go
@@ -27,7 +27,7 @@ var (
You can then start it at any time with the podman pod start <pod_id> command. The pod will be created with the initial state 'created'.`
createCommand = &cobra.Command{
- Use: "create",
+ Use: "create [options]",
Args: validate.NoArgs,
Short: "Create a new empty pod",
Long: podCreateDescription,
diff --git a/cmd/podman/pods/inspect.go b/cmd/podman/pods/inspect.go
index 142c8d270..7f81ba8fb 100644
--- a/cmd/podman/pods/inspect.go
+++ b/cmd/podman/pods/inspect.go
@@ -7,9 +7,8 @@ import (
"text/tabwriter"
"text/template"
- "github.com/containers/podman/v2/cmd/podman/parse"
+ "github.com/containers/common/pkg/report"
"github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/report"
"github.com/containers/podman/v2/cmd/podman/validate"
"github.com/containers/podman/v2/pkg/domain/entities"
"github.com/pkg/errors"
@@ -26,7 +25,7 @@ var (
By default, this will render all results in a JSON array.`)
inspectCmd = &cobra.Command{
- Use: "inspect [flags] POD [POD...]",
+ Use: "inspect [options] POD [POD...]",
Short: "Displays a pod configuration",
Long: inspectDescription,
RunE: inspect,
@@ -62,7 +61,7 @@ func inspect(cmd *cobra.Command, args []string) error {
return err
}
- if parse.MatchesJSONFormat(inspectOptions.Format) {
+ if report.IsJSON(inspectOptions.Format) {
enc := json.NewEncoder(os.Stdout)
enc.SetIndent("", " ")
return enc.Encode(responses)
diff --git a/cmd/podman/pods/kill.go b/cmd/podman/pods/kill.go
index d666d7537..1902a2c80 100644
--- a/cmd/podman/pods/kill.go
+++ b/cmd/podman/pods/kill.go
@@ -16,7 +16,7 @@ var (
The default signal is SIGKILL, or any signal specified with option --signal.`
killCommand = &cobra.Command{
- Use: "kill [flags] POD [POD...]",
+ Use: "kill [options] POD [POD...]",
Short: "Send the specified signal or SIGKILL to containers in pod",
Long: podKillDescription,
RunE: kill,
diff --git a/cmd/podman/pods/pause.go b/cmd/podman/pods/pause.go
index 591378983..bba26f90d 100644
--- a/cmd/podman/pods/pause.go
+++ b/cmd/podman/pods/pause.go
@@ -16,7 +16,7 @@ var (
All running containers within each specified pod will then be paused.`
pauseCommand = &cobra.Command{
- Use: "pause [flags] POD [POD...]",
+ Use: "pause [options] POD [POD...]",
Short: "Pause one or more pods",
Long: podPauseDescription,
RunE: pause,
diff --git a/cmd/podman/pods/prune.go b/cmd/podman/pods/prune.go
index f13d95ae9..e3eae3f71 100644
--- a/cmd/podman/pods/prune.go
+++ b/cmd/podman/pods/prune.go
@@ -23,7 +23,7 @@ var (
pruneDescription = fmt.Sprintf(`podman pod prune Removes all exited pods`)
pruneCommand = &cobra.Command{
- Use: "prune [flags]",
+ Use: "prune [options]",
Args: validate.NoArgs,
Short: "Remove all stopped pods and their containers",
Long: pruneDescription,
diff --git a/cmd/podman/pods/ps.go b/cmd/podman/pods/ps.go
index 0013cca02..688108c1a 100644
--- a/cmd/podman/pods/ps.go
+++ b/cmd/podman/pods/ps.go
@@ -10,9 +10,8 @@ import (
"text/template"
"time"
- "github.com/containers/podman/v2/cmd/podman/parse"
+ "github.com/containers/common/pkg/report"
"github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/report"
"github.com/containers/podman/v2/cmd/podman/validate"
"github.com/containers/podman/v2/pkg/domain/entities"
"github.com/docker/go-units"
@@ -25,7 +24,7 @@ var (
// Command: podman pod _ps_
psCmd = &cobra.Command{
- Use: "ps",
+ Use: "ps [options]",
Aliases: []string{"ls", "list"},
Short: "List pods",
Long: psDescription,
@@ -85,7 +84,7 @@ func pods(cmd *cobra.Command, _ []string) error {
}
switch {
- case parse.MatchesJSONFormat(psInput.Format):
+ case report.IsJSON(psInput.Format):
b, err := json.MarshalIndent(responses, "", " ")
if err != nil {
return err
diff --git a/cmd/podman/pods/restart.go b/cmd/podman/pods/restart.go
index 11e8b4ebc..119b4ddee 100644
--- a/cmd/podman/pods/restart.go
+++ b/cmd/podman/pods/restart.go
@@ -16,7 +16,7 @@ var (
All of the containers within each of the specified pods will be restarted. If a container in a pod is not currently running it will be started.`
restartCommand = &cobra.Command{
- Use: "restart [flags] POD [POD...]",
+ Use: "restart [options] POD [POD...]",
Short: "Restart one or more pods",
Long: podRestartDescription,
RunE: restart,
diff --git a/cmd/podman/pods/rm.go b/cmd/podman/pods/rm.go
index 2975db3e8..714e075e2 100644
--- a/cmd/podman/pods/rm.go
+++ b/cmd/podman/pods/rm.go
@@ -28,7 +28,7 @@ var (
The pod name or ID can be used. A pod with containers will not be removed without --force. If --force is specified, all containers will be stopped, then removed.`)
rmCommand = &cobra.Command{
- Use: "rm [flags] POD [POD...]",
+ Use: "rm [options] POD [POD...]",
Short: "Remove one or more pods",
Long: podRmDescription,
RunE: rm,
diff --git a/cmd/podman/pods/start.go b/cmd/podman/pods/start.go
index e2ca3fd41..28ee4769a 100644
--- a/cmd/podman/pods/start.go
+++ b/cmd/podman/pods/start.go
@@ -24,7 +24,7 @@ var (
All containers defined in the pod will be started.`
startCommand = &cobra.Command{
- Use: "start [flags] POD [POD...]",
+ Use: "start [options] POD [POD...]",
Short: "Start one or more pods",
Long: podStartDescription,
RunE: start,
diff --git a/cmd/podman/pods/stats.go b/cmd/podman/pods/stats.go
index 2f59e4e47..338f13d3e 100644
--- a/cmd/podman/pods/stats.go
+++ b/cmd/podman/pods/stats.go
@@ -9,9 +9,8 @@ import (
"time"
"github.com/buger/goterm"
- "github.com/containers/podman/v2/cmd/podman/parse"
+ "github.com/containers/common/pkg/report"
"github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/report"
"github.com/containers/podman/v2/cmd/podman/validate"
"github.com/containers/podman/v2/pkg/domain/entities"
"github.com/spf13/cobra"
@@ -33,7 +32,7 @@ var (
statsDescription = `Display the containers' resource-usage statistics of one or more running pod`
// Command: podman pod _pod_
statsCmd = &cobra.Command{
- Use: "stats [flags] [POD...]",
+ Use: "stats [options] [POD...]",
Short: "Display a live stream of resource usage statistics for the containers in one or more pods",
Long: statsDescription,
RunE: stats,
@@ -66,7 +65,7 @@ func stats(cmd *cobra.Command, args []string) error {
}
row := report.NormalizeFormat(statsOptions.Format)
- doJSON := parse.MatchesJSONFormat(row)
+ doJSON := report.IsJSON(row)
headers := report.Headers(entities.PodStatsReport{}, map[string]string{
"CPU": "CPU %",
diff --git a/cmd/podman/pods/stop.go b/cmd/podman/pods/stop.go
index 20c3f59bf..a2a9b0b57 100644
--- a/cmd/podman/pods/stop.go
+++ b/cmd/podman/pods/stop.go
@@ -29,7 +29,7 @@ var (
This command will stop all running containers in each of the specified pods.`
stopCommand = &cobra.Command{
- Use: "stop [flags] POD [POD...]",
+ Use: "stop [options] POD [POD...]",
Short: "Stop one or more pods",
Long: podStopDescription,
RunE: stop,
diff --git a/cmd/podman/pods/top.go b/cmd/podman/pods/top.go
index 9877db404..0ffa724da 100644
--- a/cmd/podman/pods/top.go
+++ b/cmd/podman/pods/top.go
@@ -23,7 +23,7 @@ var (
topOptions = entities.PodTopOptions{}
topCommand = &cobra.Command{
- Use: "top [flags] POD [FORMAT-DESCRIPTORS|ARGS...]",
+ Use: "top [options] POD [FORMAT-DESCRIPTORS|ARGS...]",
Short: "Display the running processes of containers in a pod",
Long: topDescription,
RunE: top,
diff --git a/cmd/podman/pods/unpause.go b/cmd/podman/pods/unpause.go
index 8474da57e..15b30db14 100644
--- a/cmd/podman/pods/unpause.go
+++ b/cmd/podman/pods/unpause.go
@@ -16,7 +16,7 @@ var (
The pod name or ID can be used.`
unpauseCommand = &cobra.Command{
- Use: "unpause [flags] POD [POD...]",
+ Use: "unpause [options] POD [POD...]",
Short: "Unpause one or more pods",
Long: podUnpauseDescription,
RunE: unpause,