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>
This commit is contained in:
baude
2019-02-10 15:25:13 -06:00
parent c86e8f180c
commit 13d2354bc6
52 changed files with 106 additions and 83 deletions

View File

@@ -27,6 +27,24 @@ var (
exitCode = 125
)
// Commands that the remote and local client have
// implemented.
var mainCommands = []*cobra.Command{
_exportCommand,
_historyCommand,
_imagesCommand,
_importCommand,
_infoCommand,
_inspectCommand,
_killCommand,
_pullCommand,
_rmiCommand,
_tagCommand,
_versionCommand,
imageCommand.Command,
systemCommand.Command,
}
var cmdsNotRequiringRootless = map[*cobra.Command]bool{
_versionCommand: true,
_createCommand: true,
@@ -92,6 +110,8 @@ func init() {
rootCmd.PersistentFlags().BoolVar(&MainGlobalOpts.Syslog, "syslog", false, "Output logging information to syslog as well as the console")
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.TmpDir, "tmpdir", "", "Path to the tmp directory")
rootCmd.AddCommand(mainCommands...)
rootCmd.AddCommand(getMainCommands()...)
}
func initConfig() {