summaryrefslogtreecommitdiff
path: root/cmd/podman/commands.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/commands.go')
-rw-r--r--cmd/podman/commands.go68
1 files changed, 51 insertions, 17 deletions
diff --git a/cmd/podman/commands.go b/cmd/podman/commands.go
index e1eba1f31..fa3839a53 100644
--- a/cmd/podman/commands.go
+++ b/cmd/podman/commands.go
@@ -6,24 +6,65 @@ import (
"github.com/spf13/cobra"
)
+// Commands that the local client implements
+func getMainCommands() []*cobra.Command {
+ rootCommands := []*cobra.Command{
+ _attachCommand,
+ _commitCommand,
+ _createCommand,
+ _diffCommand,
+ _execCommand,
+ _killCommand,
+ generateCommand.Command,
+ podCommand.Command,
+ _containerKubeCommand,
+ _psCommand,
+ _loadCommand,
+ _loginCommand,
+ _logoutCommand,
+ _logsCommand,
+ _mountCommand,
+ _pauseCommand,
+ _portCommand,
+ _refreshCommand,
+ _restartCommand,
+ _restoreCommand,
+ _rmCommand,
+ _runCommand,
+ _saveCommand,
+ _searchCommand,
+ _signCommand,
+ _startCommand,
+ _statsCommand,
+ _stopCommand,
+ _topCommand,
+ _umountCommand,
+ _unpauseCommand,
+ volumeCommand.Command,
+ _waitCommand,
+ }
+
+ if len(_varlinkCommand.Use) > 0 {
+ rootCommands = append(rootCommands, _varlinkCommand)
+ }
+ return rootCommands
+}
+
+// Commands that the local client implements
func getImageSubCommands() []*cobra.Command {
return []*cobra.Command{
- _buildCommand,
- _importCommand,
_loadCommand,
- _pullCommand,
- _rmiCommand,
_saveCommand,
_signCommand,
}
}
+// Commands that the local client implements
func getContainerSubCommands() []*cobra.Command {
return []*cobra.Command{
_attachCommand,
_checkpointCommand,
_cleanupCommand,
- _containerExistsCommand,
_commitCommand,
_createCommand,
_diffCommand,
@@ -40,7 +81,7 @@ func getContainerSubCommands() []*cobra.Command {
_restartCommand,
_restoreCommand,
_rmCommand,
- _runCommmand,
+ _runCommand,
_runlabelCommand,
_startCommand,
_statsCommand,
@@ -52,6 +93,7 @@ func getContainerSubCommands() []*cobra.Command {
}
}
+// Commands that the local client implements
func getPodSubCommands() []*cobra.Command {
return []*cobra.Command{
_podCreateCommand,
@@ -70,28 +112,20 @@ func getPodSubCommands() []*cobra.Command {
}
}
-func getVolumeSubCommands() []*cobra.Command {
- return []*cobra.Command{
- _volumeCreateCommand,
- _volumeLsCommand,
- _volumeRmCommand,
- _volumeInspectCommand,
- _volumePruneCommand,
- }
-}
-
func getGenerateSubCommands() []*cobra.Command {
return []*cobra.Command{
_containerKubeCommand,
}
}
+// Commands that the local client implements
func getPlaySubCommands() []*cobra.Command {
return []*cobra.Command{
_playKubeCommand,
}
}
+// Commands that the local client implements
func getTrustSubCommands() []*cobra.Command {
return []*cobra.Command{
_setTrustCommand,
@@ -99,9 +133,9 @@ func getTrustSubCommands() []*cobra.Command {
}
}
+// Commands that the local client implements
func getSystemSubCommands() []*cobra.Command {
return []*cobra.Command{
- _infoCommand,
_pruneSystemCommand,
}
}