Class: Kontena::Plugin::DigitalOcean::Master::TerminateCommand
- Inherits:
-
Command
- Object
- Command
- Kontena::Plugin::DigitalOcean::Master::TerminateCommand
show all
- Includes:
- Cli::Common, Cli::GridOptions, Prompts
- Defined in:
- lib/kontena/plugin/digital_ocean/master/terminate_command.rb
Instance Method Summary
collapse
Methods included from Prompts
#ask_channel, #ask_do_token, #ask_droplet_region, #ask_droplet_size, #ask_node, #ask_ssh_key, #resume_warnings, #suppress_warnings
Instance Method Details
#destroyer(token) ⇒ Object
#execute ⇒ Object
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/kontena/plugin/digital_ocean/master/terminate_command.rb', line 13
def execute
suppress_warnings require 'kontena/machine/digital_ocean'
do_token = ask_do_token
confirm_command(name) unless forced?
destroyer = destroyer(do_token)
destroyer.run!(name)
ensure
resume_warnings
end
|