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.



11
12
13
14
# File 'lib/vagrant-vmware-desktop/action/boot.rb', line 11

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

Instance Method Details

#call(env) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/vagrant-vmware-desktop/action/boot.rb', line 16

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