<commit_before>require 'rubygems'
require 'fog'

Puppet::Face.define :node, '0.0.1' do
  action :terminate do
    when_invoked do |server, options|
      connection = create_connection()

      servers = connection.servers.all('dns-name' => server)
      servers.each do |server|
        server.destroy()
      end

      nil
    end
  end
end<commit_msg>(#7237) Add explicit `--force` flag.<commit_after>require 'rubygems'
require 'fog'

Puppet::Face.define :node, '0.0.1' do
  action :terminate do
    option '--force', '-f'
    when_invoked do |server, options|
      connection = create_connection()

      servers = connection.servers.all('dns-name' => server)
      if servers.length == 1 || options[:force]
        servers.each { |server| server.destroy() }
      elsif servers.empty?
        Puppet.warning "Could not find server with DNS name '#{server}'"
      else
        Puppet.err "More than one server with DNS name '#{server}'; aborting"
      end

      nil
    end
  end
end
{'fraction_non_alphanumeric': 0.12399193548387097, 'fraction_numerical': 0.011088709677419355, 'mean_word_length': 2.7756653992395437, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5504846', 'n_tokens_mistral': 324, 'n_tokens_neox': 320, 'n_words': 89}