Sha256: e4955e216a66705ea99beff06bc6cffad91516f74532f0c839b26bfd25d8b592

Contents?: true

Size: 738 Bytes

Versions: 31

Compression:

Stored size: 738 Bytes

Contents

module Veewee
  module Provider
    module Parallels
      module BoxCommand

        def running?
          command="prlctl list -i '#{self.name}'"
          shell_results=shell_exec("#{command}",{:mute => true})
          running=shell_results.stdout.split(/\n/).grep(/^State: running/).size!=0

          env.logger.info("Vm running? #{running}")
          return running
        end

        # Check if box is running
        def exists?

          command="prlctl list --all "
          shell_results=shell_exec("#{command}",{:mute => true})
          exists=shell_results.stdout.split(/\n/).grep(/ #{name}$/).size!=0

          env.logger.info("Vm exists? #{exists}")
          return exists
        end
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
veewee-0.3.4 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.3.3 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.3.2 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.3.1 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.3.0.beta2 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.3.0.beta1 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.3.0.alpha9 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.3.0.alpha8 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.3.0.alpha7 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.3.0.alpha6 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.3.0.alpha5 lib/veewee/provider/parallels/box/helper/status.rb