summaryrefslogtreecommitdiff
path: root/cmd/podman/container.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-01-18 09:09:18 -0600
committerbaude <bbaude@redhat.com>2019-01-19 13:12:32 -0600
commit6f6cf86d8f1b916940ffc6eb79a763140bb86eca (patch)
treeb66d5822c0e9878db951acc4fb00bf7578568bfd /cmd/podman/container.go
parente3dc6609d05695e649e76d4505e4761cafebcef6 (diff)
downloadpodman-6f6cf86d8f1b916940ffc6eb79a763140bb86eca.tar.gz
podman-6f6cf86d8f1b916940ffc6eb79a763140bb86eca.tar.bz2
podman-6f6cf86d8f1b916940ffc6eb79a763140bb86eca.zip
Mask unimplemeted commands for remote client
Masking main level, image, and container commands that are not yet implemented for the remote client. As each command is completed, be sure to unmask it. Also, masking podman command line switches that are not applicable to the remote client. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/container.go')
-rw-r--r--cmd/podman/container.go43
1 files changed, 10 insertions, 33 deletions
diff --git a/cmd/podman/container.go b/cmd/podman/container.go
index 4bb6f287a..acbcbb644 100644
--- a/cmd/podman/container.go
+++ b/cmd/podman/container.go
@@ -1,52 +1,29 @@
package main
import (
+ "sort"
+
"github.com/urfave/cli"
)
var (
- subCommands = []cli.Command{
- attachCommand,
- checkpointCommand,
- cleanupCommand,
- containerExistsCommand,
- commitCommand,
- createCommand,
- diffCommand,
- execCommand,
- exportCommand,
+ containerSubCommands = []cli.Command{
inspectCommand,
- killCommand,
- logsCommand,
- psCommand,
- mountCommand,
- pauseCommand,
- portCommand,
- pruneContainersCommand,
- refreshCommand,
- restartCommand,
- restoreCommand,
- rmCommand,
- runCommand,
- runlabelCommand,
- startCommand,
- statsCommand,
- stopCommand,
- topCommand,
- umountCommand,
- unpauseCommand,
- // updateCommand,
- waitCommand,
}
-
containerDescription = "Manage containers"
containerCommand = cli.Command{
Name: "container",
Usage: "Manage Containers",
Description: containerDescription,
ArgsUsage: "",
- Subcommands: subCommands,
+ Subcommands: getContainerSubCommandsSorted(),
UseShortOptionHandling: true,
OnUsageError: usageErrorHandler,
}
)
+
+func getContainerSubCommandsSorted() []cli.Command {
+ containerSubCommands = append(containerSubCommands, getContainerSubCommands()...)
+ sort.Sort(commandSortedAlpha{containerSubCommands})
+ return containerSubCommands
+}