Sha256: 4c6a07508280855bb7481cae943d4807709816bf8ce64470be9f7d9db06e98c4
Contents?: true
Size: 912 Bytes
Versions: 10
Compression:
Stored size: 912 Bytes
Contents
require 'kontena/plugin/digital_ocean/prompts' module Kontena::Plugin::DigitalOcean::Master class TerminateCommand < Kontena::Command include Kontena::Cli::Common include Kontena::Cli::GridOptions include Kontena::Plugin::DigitalOcean::Prompts parameter "NAME", "Master name" option "--token", "TOKEN", "DigitalOcean API token", environment_variable: "DO_TOKEN" option "--force", :flag, "Force remove", default: false, attribute_name: :forced def execute suppress_warnings # until DO merges resource_kit pr #32 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 # @param [String] token def destroyer(token) Kontena::Machine::DigitalOcean::MasterDestroyer.new(token) end end end
Version data entries
10 entries across 10 versions & 3 rubygems