Class: VagrantPlugins::Openstack::Action::Resume
- Inherits:
-
AbstractAction
- Object
- AbstractAction
- VagrantPlugins::Openstack::Action::Resume
- Defined in:
- lib/vagrant-openstack-illuin-provider/action/resume.rb
Instance Method Summary collapse
- #execute(env) ⇒ Object
-
#initialize(app, _env) ⇒ Resume
constructor
A new instance of Resume.
Methods inherited from AbstractAction
Constructor Details
#initialize(app, _env) ⇒ Resume
Returns a new instance of Resume.
7 8 9 10 |
# File 'lib/vagrant-openstack-illuin-provider/action/resume.rb', line 7 def initialize(app, _env) @app = app @logger = Log4r::Logger.new('vagrant_openstack::action::resume_server') end |
Instance Method Details
#execute(env) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/vagrant-openstack-illuin-provider/action/resume.rb', line 12 def execute(env) if env[:machine].id @logger.info "Resuming suspended VM #{env[:machine].id}..." env[:ui].info I18n.t('vagrant.actions.vm.resume.resuming') env[:openstack_client].nova.resume_server(env, env[:machine].id) end @app.call(env) end |