Class: VagrantPlugins::WinAzure::Action::ConnectAzure
- Inherits:
-
Object
- Object
- VagrantPlugins::WinAzure::Action::ConnectAzure
- Defined in:
- lib/vagrant-azure/action/connect_azure.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ ConnectAzure
constructor
A new instance of ConnectAzure.
Constructor Details
#initialize(app, env) ⇒ ConnectAzure
Returns a new instance of ConnectAzure.
17 18 19 20 |
# File 'lib/vagrant-azure/action/connect_azure.rb', line 17 def initialize(app, env) @app = app @logger = Log4r::Logger.new('vagrant_azure::action::connect_aws') end |
Instance Method Details
#call(env) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/vagrant-azure/action/connect_azure.rb', line 22 def call (env) config = env[:machine].provider_config Azure.configure do |c| c.subscription_id = config.subscription_id c.management_certificate = config.mgmt_certificate c.management_endpoint = config.mgmt_endpoint c.storage_account_name = config.storage_acct_name c.storage_access_key = config.storage_access_key end # FIXME: # Defining a new class VagrantAzureService # Here we call the native azure virtual machine management service method # and add some exception handling. # Remove this once the Azure SDK adds the exception handling for the # methods defined in VagrantAzureService env[:azure_vm_service] = VagrantAzureService.new(Azure::VirtualMachineManagementService.new) @app.call(env) end |