Module: VagrantPlugins::VCloud::Util::CompileForwardedPorts
- Includes:
- Vagrant::Util::ScopedHashOverride
- Included in:
- Action::ForwardPorts
- Defined in:
- lib/vagrant-vcloud/util/compile_forwarded_ports.rb
Instance Method Summary collapse
-
#compile_forwarded_ports(config) ⇒ Object
This method compiles the forwarded ports into ForwardedPort models.
Instance Method Details
#compile_forwarded_ports(config) ⇒ Object
This method compiles the forwarded ports into ForwardedPort models.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/vagrant-vcloud/util/compile_forwarded_ports.rb', line 11 def compile_forwarded_ports(config) mappings = {} config.vm.networks.each do |type, | if type == :forwarded_port guest_port = [:guest] host_port = [:host] = scoped_hash_override(, :vcloud) id = [:id] # skip forwarded rules already found in handle_nat_port_collisions next if [:already_exists] mappings[host_port] = Model::ForwardedPort.new(id, host_port, guest_port, ) end end mappings.values end |