Class: VagrantPlugins::ProviderBhyve::Action::Load

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-bhyve/action/load.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ Load

Returns a new instance of Load.



8
9
10
11
# File 'lib/vagrant-bhyve/action/load.rb', line 8

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

Instance Method Details

#call(env) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/vagrant-bhyve/action/load.rb', line 13

def call(env)
  @machine 	= env[:machine]
  @driver	= @machine.provider.driver
  firmware	= @driver.get_attr('firmware')

         env[:ui].detail I18n.t('vagrant_bhyve.action.vm.boot.load_kernel')
  @driver.load(@machine, env[:ui]) if firmware == 'bios'

  @app.call(env)
end