From 7cd663391ed14b312f99c4df276111762e01b06e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 11 Jan 2013 15:52:45 -0800 Subject: [PATCH] Forwarded ports allow for scoped hash overrides --- plugins/providers/virtualbox/util/compile_forwarded_ports.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/providers/virtualbox/util/compile_forwarded_ports.rb b/plugins/providers/virtualbox/util/compile_forwarded_ports.rb index fb8953f56..fe281c970 100644 --- a/plugins/providers/virtualbox/util/compile_forwarded_ports.rb +++ b/plugins/providers/virtualbox/util/compile_forwarded_ports.rb @@ -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)}"