Sha256: f8fcf442473bbf596e40610483afb78c6a8a48e0259883a7db9c689dee5fbe12
Contents?: true
Size: 657 Bytes
Versions: 20
Compression:
Stored size: 657 Bytes
Contents
module Veewee module Provider module Virtualbox module BoxCommand def exists? return check?(:exists) end def running? return check?(:running) end private def check? type command = COMMANDS[type] % @vboxcmd shell_results=shell_exec("#{command}",{:mute => true}) status=shell_results.stdout.split(/\n/).grep(/\"#{Regexp.escape(name)}\"/).size!=0 env.logger.info("Vm #{type}? #{status}") return status end COMMANDS = { :running => "%s list runningvms", :exists => "%s list vms" } end end end end
Version data entries
20 entries across 20 versions & 2 rubygems