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.5.0.alpha4 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.5.0.alpha3 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.5.0.alpha2 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.5.0.alpha1 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.4.5.1 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.4.5 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.4.5.pre1 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.4.4 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.4.3 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.4.2 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.4.1 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.4.0 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.3.12 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.3.11 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.3.10 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.3.9 lib/veewee/provider/parallels/box/helper/status.rb
veewee-atlassian-0.3.11 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.3.7 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.3.6 lib/veewee/provider/parallels/box/helper/status.rb
veewee-0.3.5 lib/veewee/provider/parallels/box/helper/status.rb