<commit_before>module HP
  module Cloud
    class CLI < Thor

      map %w(servers:rm servers:delete servers:del) => 'servers:remove'

      desc "servers:remove <name>", "remove a server by name"
      long_desc <<-DESC
  Remove an existing server by specifying its name. Optionally, an availability zone can be passed.

Examples:
  hpcloud servers:remove my-server          # delete 'my-server'
  hpcloud servers:remove my-server -z az-2.region-a.geo-1  # Optionally specify an availability zone

Aliases: servers:rm, servers:delete, servers:del
      DESC
      CLI.add_common_options
      define_method "servers:remove" do |name, *names|
        cli_command(options) {
          names = [name] + names
          servers = Servers.new.get(names, false)
          servers.each { |server|
            begin
              if server.is_valid?
                server.destroy
                display "Removed server '#{name}'."
              else
                error_message(server.error_string, server.error_code)
              end
            rescue Exception => e
              error_message("Error removing image: " + e.to_s, :general_error)
            end
          }
        }
      end
    end
  end
end<commit_msg>dxcli-275 server remove prints wrong thing<commit_after>module HP
  module Cloud
    class CLI < Thor

      map %w(servers:rm servers:delete servers:del) => 'servers:remove'

      desc "servers:remove <name>", "remove a server by name"
      long_desc <<-DESC
  Remove an existing server by specifying its name. Optionally, an availability zone can be passed.

Examples:
  hpcloud servers:remove my-server          # delete 'my-server'
  hpcloud servers:remove my-server -z az-2.region-a.geo-1  # Optionally specify an availability zone

Aliases: servers:rm, servers:delete, servers:del
      DESC
      CLI.add_common_options
      define_method "servers:remove" do |name, *names|
        cli_command(options) {
          names = [name] + names
          servers = Servers.new.get(names, false)
          servers.each { |server|
            begin
              if server.is_valid?
                server.destroy
                display "Removed server '#{server.name}'."
              else
                error_message(server.error_string, server.error_code)
              end
            rescue Exception => e
              error_message("Error removing image: " + e.to_s, :general_error)
            end
          }
        }
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.0854149879129734, 'fraction_numerical': 0.0028203062046736503, 'mean_word_length': 2.0503685503685505, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6631301', 'n_tokens_mistral': 699, 'n_tokens_neox': 686, 'n_words': 200}