summaryrefslogtreecommitdiff
path: root/cmd/podman/pod.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-01-31 13:20:04 -0600
committerbaude <bbaude@redhat.com>2019-02-08 10:26:43 -0600
commit25a3923b61a5ca014318e6d957f68abd03947297 (patch)
tree2ccb4a0bd9bda70c1c258dcb1b8aca8961d9ad30 /cmd/podman/pod.go
parent962850c6e0dfcee926af31fc0ad24f1f6c26f8ac (diff)
downloadpodman-25a3923b61a5ca014318e6d957f68abd03947297.tar.gz
podman-25a3923b61a5ca014318e6d957f68abd03947297.tar.bz2
podman-25a3923b61a5ca014318e6d957f68abd03947297.zip
Migrate to cobra CLI
We intend to migrate to the cobra cli from urfave/cli because the project is more well maintained. There are also some technical reasons as well which extend into our remote client work. Signed-off-by: baude <bbaude@redhat.com>
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)
+}