lib/fog/azurerm/requests/compute/get_virtual_machine.rb in fog-azure-rm-temp-0.0.4 vs lib/fog/azurerm/requests/compute/get_virtual_machine.rb in fog-azure-rm-temp-0.0.5
- old
+ new
@@ -1,17 +1,19 @@
+INSTANCE_VIEW = 'instanceView'.freeze
+
module Fog
module Compute
class AzureRM
# This class provides the actual implementation for service calls.
class Real
def get_virtual_machine(resource_group, name, async)
msg = "Getting Virtual Machine #{name} from Resource Group '#{resource_group}'"
Fog::Logger.debug msg
begin
if async
- response = @compute_mgmt_client.virtual_machines.get_async(resource_group, name)
+ response = @compute_mgmt_client.virtual_machines.get_async(resource_group, name, INSTANCE_VIEW)
else
- response = @compute_mgmt_client.virtual_machines.get(resource_group, name)
+ response = @compute_mgmt_client.virtual_machines.get(resource_group, name, INSTANCE_VIEW)
end
rescue MsRestAzure::AzureOperationError => e
raise_azure_exception(e, msg)
end
Fog::Logger.debug "Getting Virtual Machine #{name} from Resource Group '#{resource_group}' successful" unless async