Convert example host only IPs to RFC1918
This commit is contained in:
parent
9882918903
commit
ae62c9bd68
|
@ -81,7 +81,7 @@ module Vagrant
|
||||||
#
|
#
|
||||||
# {
|
# {
|
||||||
# :type => :static,
|
# :type => :static,
|
||||||
# :ip => "33.33.33.10",
|
# :ip => "192.168.33.10",
|
||||||
# :netmask => "255.255.255.0",
|
# :netmask => "255.255.255.0",
|
||||||
# :interface => 1
|
# :interface => 1
|
||||||
# }
|
# }
|
||||||
|
|
|
@ -20,7 +20,7 @@ Vagrant::Config.run do |config|
|
||||||
# via the IP. Host-only networks can talk to the host machine as well as
|
# via the IP. Host-only networks can talk to the host machine as well as
|
||||||
# any other machines on the same network, but cannot be accessed (through this
|
# any other machines on the same network, but cannot be accessed (through this
|
||||||
# network interface) by any external networks.
|
# network interface) by any external networks.
|
||||||
# config.vm.network :hostonly, "33.33.33.10"
|
# config.vm.network :hostonly, "192.168.33.10"
|
||||||
|
|
||||||
# Assign this VM to a bridged network, allowing you to connect directly to a
|
# Assign this VM to a bridged network, allowing you to connect directly to a
|
||||||
# network using the host's network device. This makes the VM appear as another
|
# network using the host's network device. This makes the VM appear as another
|
||||||
|
|
|
@ -26,12 +26,12 @@ describe "vagrant host only networking" do
|
||||||
f.puts(<<VFILE)
|
f.puts(<<VFILE)
|
||||||
Vagrant::Config.run do |config|
|
Vagrant::Config.run do |config|
|
||||||
config.vm.box = "base"
|
config.vm.box = "base"
|
||||||
config.vm.network :hostonly, "33.33.33.10"
|
config.vm.network :hostonly, "192.168.33.10"
|
||||||
end
|
end
|
||||||
VFILE
|
VFILE
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_execute("vagrant", "up")
|
assert_execute("vagrant", "up")
|
||||||
assert_host_to_vm_network("http://33.33.33.10:8000/", 8000)
|
assert_host_to_vm_network("http://192.168.33.10:8000/", 8000)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -34,15 +34,15 @@ describe Vagrant::Config::VMConfig do
|
||||||
|
|
||||||
it "merges by appending networks" do
|
it "merges by appending networks" do
|
||||||
a = described_class.new
|
a = described_class.new
|
||||||
a.network :hostonly, "33.33.33.10"
|
a.network :hostonly, "192.168.33.10"
|
||||||
|
|
||||||
b = described_class.new
|
b = described_class.new
|
||||||
b.network :hostonly, "33.33.33.11"
|
b.network :hostonly, "192.168.33.11"
|
||||||
|
|
||||||
c = a.merge(b)
|
c = a.merge(b)
|
||||||
c.networks.length.should == 2
|
c.networks.length.should == 2
|
||||||
c.networks[0].should == [:hostonly, ["33.33.33.10"]]
|
c.networks[0].should == [:hostonly, ["192.168.33.10"]]
|
||||||
c.networks[1].should == [:hostonly, ["33.33.33.11"]]
|
c.networks[1].should == [:hostonly, ["192.168.33.11"]]
|
||||||
end
|
end
|
||||||
|
|
||||||
it "merges by appending provisioners" do
|
it "merges by appending provisioners" do
|
||||||
|
|
Loading…
Reference in New Issue