Class: VagrantPlugins::WinAzure::Action::StartInstance
- Inherits:
-
Object
- Object
- VagrantPlugins::WinAzure::Action::StartInstance
- Defined in:
- lib/vagrant-azure/action/start_instance.rb
Overview
This starts a stopped instance
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ StartInstance
constructor
include Vagrant:Util::Retryable.
Constructor Details
#initialize(app, env) ⇒ StartInstance
include Vagrant:Util::Retryable
17 18 19 20 |
# File 'lib/vagrant-azure/action/start_instance.rb', line 17 def initialize(app, env) @app = app @logger = Log4r::Logger.new('vagrant_azure:action::start_instance') end |
Instance Method Details
#call(env) ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/vagrant-azure/action/start_instance.rb', line 22 def call(env) env[:machine].id = "#{env[:machine].provider_config.vm_name}@#{env[:machine].provider_config.cloud_service_name}" unless env[:machine].id env[:machine].id =~ /@/ env[:ui].info "Attempting to start '#{$`}' in '#{$'}'" env[:azure_vm_service].start_virtual_machine($`, $') @app.call(env) end |