Sha256: 30cf56263c95a371dfde26c55b91e9d6af7efc39edf7951c31afd43428d04324
Contents?: true
Size: 803 Bytes
Versions: 2
Compression:
Stored size: 803 Bytes
Contents
module Fog module Compute class AzureRM # This class provides the actual implemention for service calls. class Real def get_virtual_machine(resource_group, name) begin promise = @compute_mgmt_client.virtual_machines.get(resource_group, name) response = promise.value! response.body rescue MsRestAzure::AzureOperationError => e msg = "Exception getting Virtual Machine #{name} from Resource Group '#{resource_group}'. #{e.body['error']['message']}" raise msg end end end # This class provides the mock implementation for unit tests. class Mock def get_virtual_machine(resource_group, name) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fog-azure-rm-0.0.1 | lib/fog/azurerm/requests/compute/get_virtual_machine.rb |
fog-azure-rm-0.0.0 | lib/fog/azurerm/requests/compute/get_virtual_machine.rb |