summaryrefslogtreecommitdiff
path: root/cmd/podman/pod.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/pod.go')
-rw-r--r--cmd/podman/pod.go41
1 files changed, 15 insertions, 26 deletions
diff --git a/cmd/podman/pod.go b/cmd/podman/pod.go
index a30361134..4104c39c7 100644
--- a/cmd/podman/pod.go
+++ b/cmd/podman/pod.go
@@ -1,35 +1,24 @@
package main
import (
- "github.com/urfave/cli"
+ "github.com/containers/libpod/cmd/podman/cliconfig"
+ "github.com/spf13/cobra"
)
var (
podDescription = `Manage container pods.
-Pods are a group of one or more containers sharing the same network, pid and ipc namespaces.
-`
- podSubCommands = []cli.Command{
- podCreateCommand,
- podExistsCommand,
- podInspectCommand,
- podKillCommand,
- podPauseCommand,
- podPsCommand,
- podRestartCommand,
- podRmCommand,
- podStartCommand,
- podStatsCommand,
- podStopCommand,
- podTopCommand,
- podUnpauseCommand,
- }
- podCommand = cli.Command{
- Name: "pod",
- Usage: "Manage pods",
- Description: podDescription,
- UseShortOptionHandling: true,
- Subcommands: podSubCommands,
- OnUsageError: usageErrorHandler,
- }
+Pods are a group of one or more containers sharing the same network, pid and ipc namespaces.`
)
+var podCommand = cliconfig.PodmanCommand{
+ Command: &cobra.Command{
+ Use: "pod",
+ Short: "Manage pods",
+ Long: podDescription,
+ },
+}
+
+func init() {
+ podCommand.AddCommand(getPodSubCommands()...)
+ rootCmd.AddCommand(podCommand.Command)
+}