<commit_before>require "log4r"
require 'pp'   # XXX FIXME REMOVE WHEN NOT NEEDED

require 'vagrant/util/retryable'

require 'vagrant-cloudstack/util/timer'

module VagrantPlugins
  module Cloudstack
    module Action
      # This runs the configured instance.
      class RunInstance
        include Vagrant::Util::Retryable

        def initialize(app, env)
          @app    = app
          @logger = Log4r::Logger.new("vagrant_cloudstack::action::run_instance")
        end

        def call(env)
          # Initialize metrics if they haven't been
          env[:metrics] ||= {}

          # Get the domain we're going to booting up in
          domain = env[:machine].provider_config.domain_id

          # Get the configs
          domain_config         = env[:machine].provider_config.get_domain_config(domain)
          zone_id               = domain_config.zone_id
          network_id            = domain_config.network_id
          network_type          = domain_config.network_type
          project_id            = domain_config.project_id
          service_offering_id   = domain_config.service_offering_id
          template_id           = domain_config.template_id
          keypair               = domain_config.keypair
          pf_ip_address_id      = domain_config.pf_ip_address_id
          pf_public_port        = domain_config.pf_public_port
          pf_private_port       = domain_config.pf_private_port
          security_group_ids    = domain_config.security_group_ids
          display_name          = domain_config.display_name
          group                 = domain_config.group
          security_group_ids    = domain_config.security_group_ids<commit_msg>Remove duplicate assignment.<commit_after>require "log4r"
require 'pp'   # XXX FIXME REMOVE WHEN NOT NEEDED

require 'vagrant/util/retryable'

require 'vagrant-cloudstack/util/timer'

module VagrantPlugins
  module Cloudstack
    module Action
      # This runs the configured instance.
      class RunInstance
        include Vagrant::Util::Retryable

        def initialize(app, env)
          @app    = app
          @logger = Log4r::Logger.new("vagrant_cloudstack::action::run_instance")
        end

        def call(env)
          # Initialize metrics if they haven't been
          env[:metrics] ||= {}

          # Get the domain we're going to booting up in
          domain = env[:machine].provider_config.domain_id

          # Get the configs
          domain_config         = env[:machine].provider_config.get_domain_config(domain)
          zone_id               = domain_config.zone_id
          network_id            = domain_config.network_id
          network_type          = domain_config.network_type
          project_id            = domain_config.project_id
          service_offering_id   = domain_config.service_offering_id
          template_id           = domain_config.template_id
          keypair               = domain_config.keypair
          pf_ip_address_id      = domain_config.pf_ip_address_id
          pf_public_port        = domain_config.pf_public_port
          pf_private_port       = domain_config.pf_private_port
          display_name          = domain_config.display_name
          group                 = domain_config.group
          security_group_ids    = domain_config.security_group_ids
{'fraction_non_alphanumeric': 0.05862898376428142, 'fraction_numerical': 0.0012026458208057728, 'mean_word_length': 2.0663594470046083, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4431900', 'n_tokens_mistral': 909, 'n_tokens_neox': 888, 'n_words': 179}