class HashiCorp::VagrantVMwareDesktop::Action::WaitForAddress
Public Class Methods
new(app, env)
click to toggle source
# File lib/vagrant-vmware-desktop/action/wait_for_address.rb, line 7 def initialize(app, env) @app = app end
Public Instance Methods
call(env)
click to toggle source
# File lib/vagrant-vmware-desktop/action/wait_for_address.rb, line 11 def call(env) env[:ui].info( I18n.t("hashicorp.vagrant_vmware_desktop.waiting_for_address")) while true # If we're interrupted then just back out return if env[:interrupted] # If we have an IP we are don break if env[:machine].provider.driver.read_ip( env[:machine].provider_config.enable_vmrun_ip_lookup ) sleep 1 end @app.call(env) end