Class: VagrantPlugins::Utm::CommandIpAddress

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant_utm/commands/ip_address.rb

Overview

Get All IP Adress of a machine.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.synopsisObject



7
8
9
# File 'lib/vagrant_utm/commands/ip_address.rb', line 7

def self.synopsis
  "UTM: outputs ip address of the vagrant machine"
end

Instance Method Details

#executeObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/vagrant_utm/commands/ip_address.rb', line 11

def execute
  opts = OptionParser.new do |o|
    o.banner = "Usage: vagrant ip-address [name|id]"
  end

  # Parse the options
  argv = parse_options(opts)
  return unless argv

  with_target_vms do |machine|
    machine.action(:ip_address)
  end

  0
end