2014-02-15 23:29:16 +00:00
|
|
|
module VagrantPlugins
|
|
|
|
module HyperV
|
|
|
|
module Action
|
2014-02-16 19:31:33 +00:00
|
|
|
class StopInstance
|
|
|
|
def initialize(app, env)
|
|
|
|
@app = app
|
|
|
|
end
|
2014-02-15 23:29:16 +00:00
|
|
|
|
2014-02-16 19:31:33 +00:00
|
|
|
def call(env)
|
2014-02-26 23:54:53 +00:00
|
|
|
env[:ui].info("Stopping the machine...")
|
2014-03-06 16:51:07 +00:00
|
|
|
env[:machine].provider.driver.stop
|
2014-02-16 19:31:33 +00:00
|
|
|
@app.call(env)
|
2014-02-15 23:29:16 +00:00
|
|
|
end
|
2014-02-16 19:31:33 +00:00
|
|
|
end
|
2014-02-15 23:29:16 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|