Class: Vagrant::FullDestroy::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-commit/command.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.synopsisObject



39
40
41
# File 'lib/vagrant-commit/command.rb', line 39

def self.synopsis
  "(plugin): Fully destroy the box (if commit was used)"
end

Instance Method Details

#executeObject



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/vagrant-commit/command.rb', line 43

def execute
  opts = OptionParser.new do |o|
    o.banner = "Usage: vagrant fulldestroy [name|id]"
  end

  # Parse the options
  argv = parse_options(opts)

  with_target_vms(argv) do |machine|
    machine.action(:halt)
    @env.action_runner.run(Vagrant::Commit::Action.action_full_destroy, {
        :machine => machine,
    })

  end
end