2013-03-03 05:24:05 +00:00
|
|
|
module Vagrant
|
|
|
|
module LXC
|
|
|
|
module Action
|
2013-04-02 00:05:19 +00:00
|
|
|
class Destroy
|
|
|
|
def initialize(app, env)
|
|
|
|
@app = app
|
|
|
|
end
|
|
|
|
|
2013-03-03 05:24:05 +00:00
|
|
|
def call(env)
|
2013-03-11 03:13:48 +00:00
|
|
|
env[:ui].info I18n.t("vagrant.actions.vm.destroy.destroying")
|
2013-04-05 05:23:30 +00:00
|
|
|
env[:machine].provider.driver.destroy
|
2013-03-03 05:24:05 +00:00
|
|
|
env[:machine].id = nil
|
|
|
|
@app.call env
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|