Forwarded ports allow for scoped hash overrides

This commit is contained in:
Mitchell Hashimoto 2013-01-11 15:52:45 -08:00
parent 102e8f23d6
commit 7cd663391e
1 changed files with 5 additions and 0 deletions

View File

@ -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)}"