s/nat engine/nat driver/
This commit is contained in:
parent
d257703496
commit
e6760d8f5b
|
@ -108,7 +108,7 @@ module Vagrant
|
|||
else
|
||||
# VirtualBox 3.2.x uses forwarded ports via NAT engines
|
||||
vm.network_adapters.collect do |na|
|
||||
na.nat_engine.forwarded_ports.collect do |fp|
|
||||
na.nat_driver.forwarded_ports.collect do |fp|
|
||||
fp.hostport.to_s
|
||||
end
|
||||
end
|
||||
|
@ -126,7 +126,7 @@ module Vagrant
|
|||
fp.each { |p| p.destroy }
|
||||
else
|
||||
runner.vm.network_adapters.each do |na|
|
||||
na.nat_engine.forwarded_ports.dup.each do |fp|
|
||||
na.nat_driver.forwarded_ports.dup.each do |fp|
|
||||
fp.destroy
|
||||
end
|
||||
end
|
||||
|
@ -147,7 +147,7 @@ module Vagrant
|
|||
port.name = name
|
||||
port.guestport = options[:guestport]
|
||||
port.hostport = options[:hostport]
|
||||
runner.vm.network_adapters[options[:adapter]].nat_engine.forwarded_ports << port
|
||||
runner.vm.network_adapters[options[:adapter]].nat_driver.forwarded_ports << port
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -140,7 +140,7 @@ module Vagrant
|
|||
# VirtualBox 3.2 specific
|
||||
pnum = nil
|
||||
env.vm.vm.network_adapters.each do |na|
|
||||
pnum = na.nat_engine.forwarded_ports.detect do |fp|
|
||||
pnum = na.nat_driver.forwarded_ports.detect do |fp|
|
||||
fp.name == env.config.ssh.forwarded_port_key
|
||||
end
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ class ForwardPortsActionTest < Test::Unit::TestCase
|
|||
fps = [mock_fp(2222), mock_fp(80)]
|
||||
na = mock("na")
|
||||
ne = mock("ne")
|
||||
na.stubs(:nat_engine).returns(ne)
|
||||
na.stubs(:nat_driver).returns(ne)
|
||||
ne.stubs(:forwarded_ports).returns(fps)
|
||||
@vms << mock_vm(:network_adapters => [na])
|
||||
assert_equal %W[2222 80], @action.used_ports
|
||||
|
@ -233,7 +233,7 @@ class ForwardPortsActionTest < Test::Unit::TestCase
|
|||
na = mock("adapter")
|
||||
engine = mock("engine")
|
||||
engine.stubs(:forwarded_ports).returns([mock_fp])
|
||||
na.stubs(:nat_engine).returns(engine)
|
||||
na.stubs(:nat_driver).returns(engine)
|
||||
na
|
||||
end
|
||||
|
||||
|
@ -280,7 +280,7 @@ class ForwardPortsActionTest < Test::Unit::TestCase
|
|||
adapter = mock("adapter")
|
||||
engine = mock("engine")
|
||||
fps = mock("forwarded ports")
|
||||
adapter.stubs(:nat_engine).returns(engine)
|
||||
adapter.stubs(:nat_driver).returns(engine)
|
||||
engine.stubs(:forwarded_ports).returns(fps)
|
||||
fps.expects(:<<).with do |port|
|
||||
assert_equal name, port.name
|
||||
|
|
Loading…
Reference in New Issue