Class: Vagrant::Command::Reload
- Defined in:
- lib/vagrant/command/reload.rb
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Vagrant::Command::Base
Instance Method Details
#execute ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/vagrant/command/reload.rb', line 6 def execute = {} opts = OptionParser.new do |opts| opts. = "Usage: vagrant reload [vm-name]" end # Parse the options argv = (opts) return if !argv @logger.debug("'reload' each target VM...") with_target_vms(argv[0]) do |vm| if vm.created? @logger.info("Reloading: #{vm.name}") vm.reload else @logger.info("Not created: #{vm.name}. Not reloading.") vm.ui.info I18n.t("vagrant.commands.common.vm_not_created") end end end |