Class: Kontena::Plugin::Upcloud::Nodes::RestartCommand

Inherits:
Command
  • Object
show all
Includes:
Cli::Common, Cli::GridOptions, Prompts::Common, Prompts::NodeName
Defined in:
lib/kontena/plugin/upcloud/nodes/restart_command.rb

Instance Method Summary collapse

Methods included from Prompts::Common

#abort_unless_api_access, included, #upcloud_client

Methods included from Prompts::NodeName

included

Instance Method Details

#executeObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/kontena/plugin/upcloud/nodes/restart_command.rb', line 11

def execute
  require_api_url
  require_current_grid

  abort_unless_api_access

  require 'kontena/machine/upcloud'

  restarter = Kontena::Machine::Upcloud::NodeRestarter.new(username, password)
  restarter.run!(name)
end