Sha256: aa8169a9c2a88f8b192be27f5ae065ce4c1bbc811dc1121f4580f88ecd4d6fbc

Contents?: true

Size: 603 Bytes

Versions: 24

Compression:

Stored size: 603 Bytes

Contents

module Kontena::Cli::Nodes
  class RemoveCommand < Kontena::Command
    include Kontena::Cli::Common
    include Kontena::Cli::GridOptions

    parameter "NODE_ID", "Node id"
    option "--force", :flag, "Force remove", default: false, attribute_name: :forced

    def execute
      require_api_url
      require_current_grid
      token = require_token
      confirm_command(node_id) unless forced?

      spinner "Removing #{node_id.colorize(:cyan)} node from #{current_grid.colorize(:cyan)} grid " do
        client(token).delete("grids/#{current_grid}/nodes/#{node_id}")
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
kontena-cli-1.0.0.pre3 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-1.0.0.pre2 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-1.0.0.pre1 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-0.17.0.pre5 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-0.17.0.pre4 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-0.17.0.pre3 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-0.17.0.pre2 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-0.17.0.pre1 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-0.16.3 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-0.16.3.rc1 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-0.16.2 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-0.16.2.rc1 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-0.16.1 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-0.16.1.rc3 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-0.16.1.rc2 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-0.16.1.rc1 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-0.16.0 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-0.16.0.rc3 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-0.16.0.rc2 lib/kontena/cli/nodes/remove_command.rb
kontena-cli-0.16.0.rc1 lib/kontena/cli/nodes/remove_command.rb