Sha256: 06766fd682786807fdca25549c3be349513520563da0b2afcbc9a560d466a5ef

Contents?: true

Size: 587 Bytes

Versions: 18

Compression:

Stored size: 587 Bytes

Contents

module Kontena::Cli::Nodes::DigitalOcean
  class TerminateCommand < Clamp::Command
    include Kontena::Cli::Common
    include Kontena::Cli::GridOptions

    parameter "NAME", "Node name"
    option "--token", "TOKEN", "DigitalOcean API token", required: true

    def execute
      require_api_url
      require_current_grid

      require 'kontena/machine/digital_ocean'
      grid = client(require_token).get("grids/#{current_grid}")
      destroyer = Kontena::Machine::DigitalOcean::NodeDestroyer.new(client(require_token), token)
      destroyer.run!(grid, name)
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
kontena-cli-0.14.7 lib/kontena/cli/nodes/digital_ocean/terminate_command.rb
kontena-cli-0.14.6 lib/kontena/cli/nodes/digital_ocean/terminate_command.rb
kontena-cli-0.14.5 lib/kontena/cli/nodes/digital_ocean/terminate_command.rb
kontena-cli-0.14.4 lib/kontena/cli/nodes/digital_ocean/terminate_command.rb
kontena-cli-0.14.3 lib/kontena/cli/nodes/digital_ocean/terminate_command.rb
kontena-cli-0.14.2 lib/kontena/cli/nodes/digital_ocean/terminate_command.rb
kontena-cli-0.14.1 lib/kontena/cli/nodes/digital_ocean/terminate_command.rb
kontena-cli-0.14.0 lib/kontena/cli/nodes/digital_ocean/terminate_command.rb
kontena-cli-0.13.4 lib/kontena/cli/nodes/digital_ocean/terminate_command.rb
kontena-cli-0.13.3 lib/kontena/cli/nodes/digital_ocean/terminate_command.rb
kontena-cli-0.13.2 lib/kontena/cli/nodes/digital_ocean/terminate_command.rb
kontena-cli-0.13.1 lib/kontena/cli/nodes/digital_ocean/terminate_command.rb
kontena-cli-0.13.0.1 lib/kontena/cli/nodes/digital_ocean/terminate_command.rb
kontena-cli-0.13.0 lib/kontena/cli/nodes/digital_ocean/terminate_command.rb
kontena-cli-0.12.3 lib/kontena/cli/nodes/digital_ocean/terminate_command.rb
kontena-cli-0.12.2 lib/kontena/cli/nodes/digital_ocean/terminate_command.rb
kontena-cli-0.12.1 lib/kontena/cli/nodes/digital_ocean/terminate_command.rb
kontena-cli-0.12.0 lib/kontena/cli/nodes/digital_ocean/terminate_command.rb