Remove old commands
This commit is contained in:
parent
deb346d5a1
commit
945f3bba67
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue