Sha256: d5f8176e0a2ec6c0deca8577f3e91709cebe6130b68629ea61075a7221043168

Contents?: true

Size: 703 Bytes

Versions: 11

Compression:

Stored size: 703 Bytes

Contents

module Veewee
  module Provider
    module Virtualbox
      module BoxCommand

        def exists?
          command="#{@vboxcmd} list vms"
          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

        def running?
          command="#{@vboxcmd} list runningvms"
          shell_results=shell_exec("#{command}",{:mute => true})
          running=shell_results.stdout.split(/\n/).grep(/\"#{name}\"/).size!=0

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

      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

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