Class: Veewee::Provider::Parallels::Provider

Inherits:
Core::Provider show all
Defined in:
lib/veewee/provider/parallels/provider.rb

Instance Attribute Summary

Attributes inherited from Core::Provider

#env, #name, #options, #type

Instance Method Summary collapse

Methods inherited from Core::Provider

available?, #gem_available?, #gems_available?, #get_box, #initialize, #ui

Methods included from Core::Helper::Shell

#shell_exec

Constructor Details

This class inherits a constructor from Veewee::Provider::Core::Provider

Instance Method Details

#check_requirementsObject

include ::Veewee::Provider::Vmfusion::ProviderCommand



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/veewee/provider/parallels/provider.rb', line 10

def check_requirements
  unless self.shell_exec("prlctl --version").status == 0
    raise Veewee::Error,"Could not execute prlctl command. Please install Parallels or make sure prlctl is in the Path"
  end

  unless self.shell_exec("arp -an").status == 0
    raise Veewee::Error,"Could not execute arp command. That should never happen :)"
  end

  unless self.shell_exec("python --version").status == 0
    raise Veewee::Error,"Could not execute python command. Please install or make it available in your path"
  end

  check_file=File.join(File.dirname(__FILE__),'..','..','..','python','parallels_sdk_check.py')
  unless self.shell_exec("python #{check_file}").status == 0
    raise Veewee::Error,"Could not connect to the parallels local service. To make it work, install the Parallels SDK that matches your version of parallels"
  end
end