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
vagrant-0.9.0 lib/vagrant/command/resume.rb