`vagrant halt`
This commit is contained in:
parent
fd5b2dee27
commit
0e43d8b55f
|
@ -1,7 +1,7 @@
|
|||
module Vagrant
|
||||
module Command
|
||||
class DestroyCommand < Base
|
||||
desc "Destroy the environment, deleting the created virtual machines."
|
||||
desc "Destroy the environment, deleting the created virtual machines"
|
||||
register "destroy"
|
||||
|
||||
def execute
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
module Vagrant
|
||||
module Command
|
||||
class HaltCommand < Base
|
||||
desc "Halt the running VMs in the environment"
|
||||
class_option :force, :type => :boolean, :default => false, :aliases => "-f"
|
||||
register "halt"
|
||||
|
||||
def execute
|
||||
target_vms.each do |vm|
|
||||
if vm.created?
|
||||
vm.halt(options)
|
||||
else
|
||||
vm.env.ui.info "VM not created. Moving on..."
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue