Remove old commands

This commit is contained in:
Mitchell Hashimoto 2012-04-19 21:29:25 -07:00
parent deb346d5a1
commit 945f3bba67
4 changed files with 0 additions and 142 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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