Class: VagrantPlugins::VMM::Action::StartInstance
- Inherits:
-
Object
- Object
- VagrantPlugins::VMM::Action::StartInstance
- Defined in:
- lib/vagrant-vmm/action/start_instance.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ StartInstance
constructor
A new instance of StartInstance.
Constructor Details
#initialize(app, env) ⇒ StartInstance
Returns a new instance of StartInstance.
5 6 7 |
# File 'lib/vagrant-vmm/action/start_instance.rb', line 5 def initialize(app, env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/vagrant-vmm/action/start_instance.rb', line 9 def call(env) vmm_server_address = env[:machine].provider_config.vmm_server_address # generate options = { vmm_server_address: vmm_server_address, proxy_server_address: env[:machine].provider_config.proxy_server_address } env[:ui].output('Starting the machine...') env[:machine].provider.driver.start() env[:machine].provider.reset_state env[:ui].output('Machine started') @app.call(env) end |