Class: Kontena::Plugin::Upcloud::Nodes::TerminateCommand

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

Instance Method Summary collapse

Instance Method Details

#executeObject



12
13
14
15
16
17
# File 'lib/kontena/plugin/upcloud/nodes/terminate_command.rb', line 12

def execute
  require_relative '../../../machine/upcloud'
  grid = client.get("grids/#{current_grid}")
  destroyer = Kontena::Machine::Upcloud::NodeDestroyer.new(client, username, password)
  destroyer.run!(grid, name)
end