Sha256: 580cce358d7fe4d781040bf280e502f559a0164220ff7fbcc0eb953c92d5ee0d

Contents?: true

Size: 512 Bytes

Versions: 6

Compression:

Stored size: 512 Bytes

Contents

module Vagrant
  module Actions
    module VM
      class Destroy < Base
        def execute!
          @runner.invoke_around_callback(:destroy) do
            destroy_vm
            update_dotfile
          end
        end

        def destroy_vm
          logger.info "Destroying VM and associated drives..."
          @runner.vm.destroy(:destroy_medium => :delete)
          @runner.vm = nil
        end

        def update_dotfile
          @runner.env.update_dotfile
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
vagrantup-0.4.3.dev lib/vagrant/actions/vm/destroy.rb
vagrantup-0.4.1 lib/vagrant/actions/vm/destroy.rb
vagrantup-0.4.0 lib/vagrant/actions/vm/destroy.rb
vagrant-0.4.2 lib/vagrant/actions/vm/destroy.rb
vagrant-0.4.1 lib/vagrant/actions/vm/destroy.rb
vagrant-0.4.0 lib/vagrant/actions/vm/destroy.rb