Class: VagrantPlugins::Openstack::Action::Suspend
- Inherits:
-
Object
- Object
- VagrantPlugins::Openstack::Action::Suspend
- Defined in:
- lib/vagrant-openstack-provider/action/suspend.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, _env) ⇒ Suspend
constructor
A new instance of Suspend.
Constructor Details
#initialize(app, _env) ⇒ Suspend
Returns a new instance of Suspend.
5 6 7 |
# File 'lib/vagrant-openstack-provider/action/suspend.rb', line 5 def initialize(app, _env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/vagrant-openstack-provider/action/suspend.rb', line 9 def call(env) if env[:machine].id env[:ui].info I18n.t('vagrant.actions.vm.suspend.suspending') env[:openstack_client].nova.suspend_server(env, env[:machine].id) end @app.call(env) end |