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 ProviderVirtualBox
|
||||
module Util
|
||||
module CompileForwardedPorts
|
||||
include Vagrant::Util::ScopedHashOverride
|
||||
|
||||
# This method compiles the forwarded ports into {ForwardedPort}
|
||||
# models.
|
||||
def compile_forwarded_ports(config)
|
||||
|
@ -12,6 +16,7 @@ module VagrantPlugins
|
|||
guest_port = args[0]
|
||||
host_port = args[1]
|
||||
options = args[2] || {}
|
||||
options = scoped_hash_override(options, :virtualbox)
|
||||
id = options[:id] ||
|
||||
"#{guest_port.to_s(32)}-#{host_port.to_s(32)}"
|
||||
|
||||
|
|
Loading…
Reference in New Issue