Sha256: 26d24802da0e8d622d365bf2c97e0e676607286a795ccd29ea966900c20edeab

Contents?: true

Size: 712 Bytes

Versions: 21

Compression:

Stored size: 712 Bytes

Contents

require 'optparse'

module Vagrant
  module Command
    class Resume < Base
      def execute
        options = {}

        opts = OptionParser.new do |opts|
          opts.banner = "Usage: vagrant resume [vm-name]"
        end

        # Parse the options
        argv = parse_options(opts)
        return if !argv

        @logger.debug("'resume' each target VM...")
        with_target_vms(argv[0]) do |vm|
          if vm.created?
            @logger.info("Resume: #{vm.name}")
            vm.resume
          else
            @logger.info("Not created: #{vm.name}. Not resuming.")
            vm.ui.info I18n.t("vagrant.commands.common.vm_not_created")
          end
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
vagrantup-1.0.1 lib/vagrant/command/resume.rb
vagrantup-1.0.0 lib/vagrant/command/resume.rb
vagrantup-0.9.99.2 lib/vagrant/command/resume.rb
vagrantup-0.9.99.1 lib/vagrant/command/resume.rb
vagrantup-0.9.7 lib/vagrant/command/resume.rb
vagrantup-0.9.6 lib/vagrant/command/resume.rb
vagrantup-0.9.5 lib/vagrant/command/resume.rb
vagrantup-0.9.4 lib/vagrant/command/resume.rb
vagrantup-0.9.3 lib/vagrant/command/resume.rb
vagrantup-0.9.2 lib/vagrant/command/resume.rb
vagrantup-0.9.1 lib/vagrant/command/resume.rb
vagrantup-0.9.0 lib/vagrant/command/resume.rb
vagrant-1.0.1 lib/vagrant/command/resume.rb
vagrant-1.0.0 lib/vagrant/command/resume.rb
vagrant-0.9.7 lib/vagrant/command/resume.rb
vagrant-0.9.5 lib/vagrant/command/resume.rb
vagrant-0.9.4 lib/vagrant/command/resume.rb
vagrant-0.9.3 lib/vagrant/command/resume.rb
vagrant-0.9.2 lib/vagrant/command/resume.rb
vagrant-0.9.1 lib/vagrant/command/resume.rb