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