class Kontena::MainCommand

Public Class Methods

register(command, description, command_class) click to toggle source

@param [String] command @param [String] description @param [Class] klass

# File lib/kontena/main_command.rb, line 42
def self.register(command, description, command_class)
  subcommand(command, description, command_class)
end

Public Instance Methods

execute() click to toggle source
# File lib/kontena/main_command.rb, line 36
def execute
end
known_plugin_subcommand?(name) click to toggle source
# File lib/kontena/main_command.rb, line 63
def known_plugin_subcommand?(name)
  ['vagrant', 'packet', 'digitalocean', 'azure', 'upcloud', 'aws', 'shell'].include?(name)
end
subcommand_missing(name) click to toggle source
Calls superclass method
# File lib/kontena/main_command.rb, line 46
def subcommand_missing(name)
  extend Kontena::Cli::Common
  if known_plugin_subcommand?(name)
    exit_with_error "The '#{name}' plugin has not been installed. Use: kontena plugin install #{name}"
  elsif name == 'login'
    exit_with_error "Use 'kontena master login' to log into a Kontena Master\n"+
           "         or 'kontena cloud login' for logging into your Kontena Cloud account"
  elsif name == 'logout'
    exit_with_error "Use 'kontena master logout' to log out from a Kontena Master\n"+
           "         or 'kontena cloud logout' for logging out from your Kontena Cloud account"
  elsif name == 'app'
    exit_with_error "The deprecated app subcommand has been moved into a plugin. You can install\n" +
           "         it by using 'kontena plugin install app-command'"
  end
  super
end