Class: VagrantPlugins::ProviderLibvirt::Cap::PublicAddress

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-libvirt/cap/public_address.rb

Class Method Summary collapse

Class Method Details

.public_address(machine) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/vagrant-libvirt/cap/public_address.rb', line 5

def self.public_address(machine)
  # This does not need to be a globally routable address, it
  # only needs to be accessible from the machine running
  # Vagrant.
  ssh_info = machine.ssh_info
  return nil if !ssh_info
  ssh_info[:host]
end