Sha256: 1e479aaae3b1d3593dada286c9d3082db8869bce168ad27cbadb00603f084ce9

Contents?: true

Size: 609 Bytes

Versions: 31

Compression:

Stored size: 609 Bytes

Contents

module Veewee
  module Provider
    module Parallels
      module BoxCommand

        # Get the IP address of the box
        def ip_address
          mac=mac_address
          command="grep #{mac} /Library/Preferences/Parallels/parallels_dhcp_leases|cut -d '=' -f 1"
          ip=shell_exec("#{command}").stdout.strip.downcase
          return ip
        end

        def mac_address
          command="prlctl list -i '#{self.name}'|grep 'net0 (' | cut -d '=' -f 3 | cut -d ' ' -f 1 "
          mac=shell_exec("#{command}").stdout.strip.downcase
          return mac
        end

      end
    end
  end
end

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
veewee-0.5.0.alpha4 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-0.5.0.alpha3 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-0.5.0.alpha2 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-0.5.0.alpha1 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-0.4.5.1 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-0.4.5 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-0.4.5.pre1 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-0.4.4 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-0.4.3 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-0.4.2 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-0.4.1 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-0.4.0 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-0.3.12 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-0.3.11 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-0.3.10 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-0.3.9 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-atlassian-0.3.11 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-0.3.7 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-0.3.6 lib/veewee/provider/parallels/box/helper/ip.rb
veewee-0.3.5 lib/veewee/provider/parallels/box/helper/ip.rb