summaryrefslogtreecommitdiff
path: root/cmd/podman/volume.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/volume.go')
-rw-r--r--cmd/podman/volume.go33
1 files changed, 15 insertions, 18 deletions
diff --git a/cmd/podman/volume.go b/cmd/podman/volume.go
index 913592e74..bae778e52 100644
--- a/cmd/podman/volume.go
+++ b/cmd/podman/volume.go
@@ -1,26 +1,23 @@
package main
import (
- "github.com/urfave/cli"
+ "github.com/containers/libpod/cmd/podman/cliconfig"
+ "github.com/spf13/cobra"
)
-var (
- volumeDescription = `Manage volumes.
+var volumeDescription = `Manage volumes.
Volumes are created in and can be shared between containers.`
- volumeSubCommands = []cli.Command{
- volumeCreateCommand,
- volumeLsCommand,
- volumeRmCommand,
- volumeInspectCommand,
- volumePruneCommand,
- }
- volumeCommand = cli.Command{
- Name: "volume",
- Usage: "Manage volumes",
- Description: volumeDescription,
- UseShortOptionHandling: true,
- Subcommands: volumeSubCommands,
- }
-)
+var volumeCommand = cliconfig.PodmanCommand{
+ Command: &cobra.Command{
+ Use: "volume",
+ Short: "Manage volumes",
+ Long: volumeDescription,
+ },
+}
+
+func init() {
+ volumeCommand.AddCommand(getVolumeSubCommands()...)
+ rootCmd.AddCommand(volumeCommand.Command)
+}