Class: VagrantPlugins::XenServer::Action::HaltVM
- Inherits:
-
Object
- Object
- VagrantPlugins::XenServer::Action::HaltVM
- Defined in:
- lib/vagrant-xenserver/action/halt_vm.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ HaltVM
constructor
A new instance of HaltVM.
Constructor Details
#initialize(app, env) ⇒ HaltVM
Returns a new instance of HaltVM.
8 9 10 11 |
# File 'lib/vagrant-xenserver/action/halt_vm.rb', line 8 def initialize(app, env) @app = app @logger = Log4r::Logger.new("vagrant::xenserver::actions::halt_vm") end |
Instance Method Details
#call(env) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/vagrant-xenserver/action/halt_vm.rb', line 13 def call(env) myvm = env[:machine].id shutdown_result = env[:xc].VM.clean_shutdown(myvm) @app.call env end |