Sha256: c97095a5ce5c7c41b50f1c6a7ca13f752aa853b23cd97beca0d8f1ff44b8a344

Contents?: true

Size: 597 Bytes

Versions: 3

Compression:

Stored size: 597 Bytes

Contents

# frozen_string_literal: true

require 'log4r'
require 'securerandom'
require 'digest/md5'

module VagrantPlugins
  module ProviderLocal
    module Action
      # This will create the Instance
      class Create
        def initialize(app, _env)
          @logger = Log4r::Logger.new('vagrant_local::action::import')
          @app = app
        end

        def call(env)
          @machine = env[:machine]
          @driver  = @machine.provider.driver
          @machine.id = SecureRandom.uuid
          @driver.install(env[:ui])
          @app.call(env)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vagrant-local-0.0.3 lib/vagrant-local/action/create.rb
vagrant-local-0.0.2 lib/vagrant-local/action/create.rb
vagrant-local-0.0.1 lib/vagrant-local/action/create.rb