Class: Kontena::Cli::Master::JoinCommand
- Inherits:
-
Kontena::Command
- Object
- Clamp::Command
- Kontena::Command
- Kontena::Cli::Master::JoinCommand
- Defined in:
- lib/kontena/cli/master/join_command.rb
Instance Attribute Summary
Attributes inherited from Kontena::Command
#arguments, #exit_code, #result
Instance Method Summary collapse
Methods inherited from Kontena::Command
banner, callback_matcher, #help_requested?, inherited, #instance, load_subcommand, requires_current_account_token, requires_current_account_token?, requires_current_grid, requires_current_grid?, requires_current_master, requires_current_master?, requires_current_master_token, requires_current_master_token?, #run, #run_callbacks, #verify_current_account_token, #verify_current_grid, #verify_current_master, #verify_current_master_token
Instance Method Details
#execute ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/kontena/cli/master/join_command.rb', line 10 def execute params = [] params += ["--join", self.invite_code] params << "--remote" if self.remote? params += ["--name", self.name] if self.name params << "--verbose" if self.verbose? cmd = ['master', 'login'] + params cmd << url Kontena.run!(cmd) end |