Forwarded ports allow for scoped hash overrides
This commit is contained in:
parent
102e8f23d6
commit
7cd663391e
|
@ -1,7 +1,11 @@
|
||||||
|
require "vagrant/util/scoped_hash_override"
|
||||||
|
|
||||||
module VagrantPlugins
|
module VagrantPlugins
|
||||||
module ProviderVirtualBox
|
module ProviderVirtualBox
|
||||||
module Util
|
module Util
|
||||||
module CompileForwardedPorts
|
module CompileForwardedPorts
|
||||||
|
include Vagrant::Util::ScopedHashOverride
|
||||||
|
|
||||||
# This method compiles the forwarded ports into {ForwardedPort}
|
# This method compiles the forwarded ports into {ForwardedPort}
|
||||||
# models.
|
# models.
|
||||||
def compile_forwarded_ports(config)
|
def compile_forwarded_ports(config)
|
||||||
|
@ -12,6 +16,7 @@ module VagrantPlugins
|
||||||
guest_port = args[0]
|
guest_port = args[0]
|
||||||
host_port = args[1]
|
host_port = args[1]
|
||||||
options = args[2] || {}
|
options = args[2] || {}
|
||||||
|
options = scoped_hash_override(options, :virtualbox)
|
||||||
id = options[:id] ||
|
id = options[:id] ||
|
||||||
"#{guest_port.to_s(32)}-#{host_port.to_s(32)}"
|
"#{guest_port.to_s(32)}-#{host_port.to_s(32)}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue