Class: HashiCorp::VagrantVMwareDesktop::Action::Boot

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/vagrant-vmware-desktop/action/boot.rb

Overview

This class boots the actual VMware VM. It also waits for it to complete booting.

Instance Method Summary collapse

Methods included from Common

#to_s

Constructor Details

#initialize(app, env) ⇒ Boot

Returns a new instance of Boot.



14
15
16
17
# File 'lib/vagrant-vmware-desktop/action/boot.rb', line 14

def initialize(app, env)
  @app = app
  @logger = Log4r::Logger.new("hashicorp::provider::vmware::boot")
end

Instance Method Details

#call(env) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/vagrant-vmware-desktop/action/boot.rb', line 19

def call(env)
  env[:ui].info(I18n.t("hashicorp.vagrant_vmware_desktop.booting"))
  env[:machine].provider.driver.start(
    env[:machine].provider_config.gui)

  @app.call(env)
end