Merge pull request #1945 from znz/fix/master/forwarded_port-guest_ip

pass guest_ip option from config to driver [GH-1121]
This commit is contained in:
Mitchell Hashimoto 2013-07-18 05:01:48 -07:00
commit d3993bb631
2 changed files with 7 additions and 0 deletions

View File

@ -69,6 +69,7 @@ module VagrantPlugins
# Add the options to the ports array to send to the driver later
ports << {
:adapter => fp.adapter,
:guestip => fp.guest_ip,
:guestport => fp.guest_port,
:hostip => fp.host_ip,
:hostport => fp.host_port,

View File

@ -24,6 +24,11 @@ module VagrantPlugins
# @return [String]
attr_reader :protocol
# The IP that the forwarded port will connect to on the guest machine.
#
# @return [String]
attr_reader :guest_ip
# The port on the guest to be exposed on the host.
#
# @return [Integer]
@ -48,6 +53,7 @@ module VagrantPlugins
@auto_correct = true
@auto_correct = options[:auto_correct] if options.has_key?(:auto_correct)
@adapter = (options[:adapter] || 1).to_i
@guest_ip = options[:guest_ip] || nil
@host_ip = options[:host_ip] || nil
@protocol = options[:protocol] || "tcp"
end