Module: VagrantPlugins::ProviderVeertu::Cap
- Defined in:
- lib/vagrant-veertu/cap.rb,
lib/vagrant-veertu/cap/public_address.rb
Defined Under Namespace
Modules: PublicAddress
Class Method Summary collapse
-
.forwarded_ports(machine) ⇒ Hash<Integer, Integer>
Reads the forwarded ports that currently exist on the machine itself.
Class Method Details
.forwarded_ports(machine) ⇒ Hash<Integer, Integer>
Reads the forwarded ports that currently exist on the machine itself. This raises an exception if the machine isn’t running.
This also may not match up with configured forwarded ports, because Vagrant auto port collision fixing may have taken place.
11 12 13 14 15 16 17 18 19 |
# File 'lib/vagrant-veertu/cap.rb', line 11 def self.forwarded_ports(machine) return nil if machine.state.id != :running {}.tap do |result| machine.provider.driver.read_forwarded_ports.each do |_, _, h, g| result[h] = g end end end |