class HashiCorp::VagrantVMwareDesktop::Action::PrepareForwardedPortCollisionParams
This prepares some variables for the environment hash so that forwarded port collision detection works properly with VMware.
Public Class Methods
new(app, env)
click to toggle source
# File lib/vagrant-vmware-desktop/action/prepare_forwarded_port_collision_params.rb, line 11 def initialize(app, env) @app = app @logger = Log4r::Logger.new("hashicorp::provider::vmware::prepare_fp_collision") end
Public Instance Methods
call(env)
click to toggle source
# File lib/vagrant-vmware-desktop/action/prepare_forwarded_port_collision_params.rb, line 16 def call(env) # Get the forwared ports for all NAT devices and mark them as in use. env[:port_collision_extra_in_use] = env[:machine].provider.driver.all_forwarded_ports # Repair the forwarded port collisions env[:port_collision_repair] = true @app.call(env) end