diff options
author | baude <bbaude@redhat.com> | 2019-02-10 15:25:13 -0600 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-02-11 12:53:21 -0600 |
commit | 13d2354bc6b43571061d6eccab560fe1f226339e (patch) | |
tree | 07d6b759d83e91bd9c3097ee46428a230728c47a /cmd/podman/commands.go | |
parent | c86e8f180c8b0cdbd1bafe327c4671370096c45f (diff) | |
download | podman-13d2354bc6b43571061d6eccab560fe1f226339e.tar.gz podman-13d2354bc6b43571061d6eccab560fe1f226339e.tar.bz2 podman-13d2354bc6b43571061d6eccab560fe1f226339e.zip |
Separate remote and local commands
In the previous CLI, we had an accurate depiction of commands
available for the remote client and those available for the
local client.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/commands.go')
-rw-r--r-- | cmd/podman/commands.go | 57 |
1 files changed, 52 insertions, 5 deletions
diff --git a/cmd/podman/commands.go b/cmd/podman/commands.go index e1eba1f31..fd438e2fc 100644 --- a/cmd/podman/commands.go +++ b/cmd/podman/commands.go @@ -6,24 +6,66 @@ import ( "github.com/spf13/cobra" ) +// Commands that the local client implements +func getMainCommands() []*cobra.Command { + rootCommands := []*cobra.Command{ + _attachCommand, + _buildCommand, + _commitCommand, + _createCommand, + _diffCommand, + _execCommand, + _killCommand, + generateCommand.Command, + podCommand.Command, + _containerKubeCommand, + _psCommand, + _loadCommand, + _loginCommand, + _logoutCommand, + _logsCommand, + _mountCommand, + _pauseCommand, + _portCommand, + _pushCommand, + _refreshCommand, + _restartCommand, + _restoreCommand, + _rmCommand, + _runCommmand, + _saveCommand, + _searchCommand, + _signCommand, + _startCommand, + _statsCommand, + _stopCommand, + _topCommand, + _umountCommand, + _unpauseCommand, + _varlinkCommand, + volumeCommand.Command, + _waitCommand, + } + return rootCommands +} + +// Commands that the local client implements func getImageSubCommands() []*cobra.Command { return []*cobra.Command{ _buildCommand, - _importCommand, _loadCommand, - _pullCommand, - _rmiCommand, + _pushCommand, _saveCommand, _signCommand, } } +// Commands that the local client implements func getContainerSubCommands() []*cobra.Command { return []*cobra.Command{ _attachCommand, _checkpointCommand, _cleanupCommand, - _containerExistsCommand, _commitCommand, _createCommand, _diffCommand, @@ -52,6 +94,7 @@ func getContainerSubCommands() []*cobra.Command { } } +// Commands that the local client implements func getPodSubCommands() []*cobra.Command { return []*cobra.Command{ _podCreateCommand, @@ -70,6 +113,7 @@ func getPodSubCommands() []*cobra.Command { } } +// Commands that the local client implements func getVolumeSubCommands() []*cobra.Command { return []*cobra.Command{ _volumeCreateCommand, @@ -80,18 +124,21 @@ func getVolumeSubCommands() []*cobra.Command { } } +// Commands that the local client implements 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 +146,9 @@ func getTrustSubCommands() []*cobra.Command { } } +// Commands that the local client implements func getSystemSubCommands() []*cobra.Command { return []*cobra.Command{ - _infoCommand, _pruneSystemCommand, } } |