Class: VagrantPlugins::SoftLayer::Action::SuspendInstance
- Inherits:
-
Object
- Object
- VagrantPlugins::SoftLayer::Action::SuspendInstance
- Includes:
- Util::Warden
- Defined in:
- lib/vagrant-softlayer/action/suspend_instance.rb
Overview
This suspends the running instance.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ SuspendInstance
constructor
A new instance of SuspendInstance.
Methods included from Util::Warden
Constructor Details
#initialize(app, env) ⇒ SuspendInstance
Returns a new instance of SuspendInstance.
8 9 10 |
# File 'lib/vagrant-softlayer/action/suspend_instance.rb', line 8 def initialize(app, env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/vagrant-softlayer/action/suspend_instance.rb', line 12 def call(env) env[:ui].info I18n.t("vagrant_softlayer.vm.suspending") sl_warden { env[:sl_machine].pause } @app.call(env) end |