From 945f3bba67edacd1439f9091dede21f709ae0730 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 19 Apr 2012 21:29:25 -0700 Subject: [PATCH] Remove old commands --- lib/vagrant/command/resume.rb | 33 ---------------------------- lib/vagrant/command/status.rb | 36 ------------------------------ lib/vagrant/command/suspend.rb | 33 ---------------------------- lib/vagrant/command/up.rb | 40 ---------------------------------- 4 files changed, 142 deletions(-) delete mode 100644 lib/vagrant/command/resume.rb delete mode 100644 lib/vagrant/command/status.rb delete mode 100644 lib/vagrant/command/suspend.rb delete mode 100644 lib/vagrant/command/up.rb diff --git a/lib/vagrant/command/resume.rb b/lib/vagrant/command/resume.rb deleted file mode 100644 index b4ed7ea49..000000000 --- a/lib/vagrant/command/resume.rb +++ /dev/null @@ -1,33 +0,0 @@ -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) 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 - - # Success, exit status 0 - 0 - end - end - end -end diff --git a/lib/vagrant/command/status.rb b/lib/vagrant/command/status.rb deleted file mode 100644 index 4c2ec1452..000000000 --- a/lib/vagrant/command/status.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'optparse' - -module Vagrant - module Command - class Status < Base - def execute - options = {} - - opts = OptionParser.new do |opts| - opts.banner = "Usage: vagrant status [vm-name]" - end - - # Parse the options - argv = parse_options(opts) - return if !argv - - state = nil - results = [] - with_target_vms(argv) do |vm| - state = vm.state.to_s if !state - results << "#{vm.name.to_s.ljust(25)}#{vm.state.to_s.gsub("_", " ")}" - end - - state = results.length == 1 ? state : "listing" - - @env.ui.info(I18n.t("vagrant.commands.status.output", - :states => results.join("\n"), - :message => I18n.t("vagrant.commands.status.#{state}")), - :prefix => false) - - # Success, exit status 0 - 0 - end - end - end -end diff --git a/lib/vagrant/command/suspend.rb b/lib/vagrant/command/suspend.rb deleted file mode 100644 index fd121a456..000000000 --- a/lib/vagrant/command/suspend.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'optparse' - -module Vagrant - module Command - class Suspend < Base - def execute - options = {} - - opts = OptionParser.new do |opts| - opts.banner = "Usage: vagrant suspend [vm-name]" - end - - # Parse the options - argv = parse_options(opts) - return if !argv - - @logger.debug("'suspend' each target VM...") - with_target_vms(argv) do |vm| - if vm.created? - @logger.info("Suspending: #{vm.name}") - vm.suspend - else - @logger.info("Not created: #{vm.name}. Not suspending.") - vm.ui.info I18n.t("vagrant.commands.common.vm_not_created") - end - end - - # Success, exit status 0 - 0 - end - end - end -end diff --git a/lib/vagrant/command/up.rb b/lib/vagrant/command/up.rb deleted file mode 100644 index 394f65765..000000000 --- a/lib/vagrant/command/up.rb +++ /dev/null @@ -1,40 +0,0 @@ -require 'optparse' - -require 'vagrant/command/start_mixins' - -module Vagrant - module Command - class Up < Base - include StartMixins - - def execute - options = {} - opts = OptionParser.new do |opts| - opts.banner = "Usage: vagrant up [vm-name] [--[no-]provision] [-h]" - opts.separator "" - build_start_options(opts, options) - end - - # Parse the options - argv = parse_options(opts) - return if !argv - - # Go over each VM and bring it up - @logger.debug("'Up' each target VM...") - with_target_vms(argv) do |vm| - if vm.created? - @logger.info("Booting: #{vm.name}") - vm.ui.info I18n.t("vagrant.commands.up.vm_created") - vm.start(options) - else - @logger.info("Creating: #{vm.name}") - vm.up(options) - end - end - - # Success, exit status 0 - 0 - end - end - end -end