Sha256: 49e00486d09f5b2e09c3a2e886df3e1f7889ae10b0f2921f1cd633cb11a88ab6
Contents?: true
Size: 1.15 KB
Versions: 47
Compression:
Stored size: 1.15 KB
Contents
module Fog module Compute class AzureRM # This class provides the actual implementation for service call. class Real def get_availability_set(resource_group, name) msg = "Listing Availability Set: #{name} in Resource Group: #{resource_group}" Fog::Logger.debug msg begin @compute_mgmt_client.availability_sets.get(resource_group, name) rescue MsRestAzure::AzureOperationError => e raise_azure_exception(e, msg) end end end # This class provides the mock implementation for unit tests. class Mock def get_availability_set(*) { 'id' => "/subscriptions/########-####-####-####-############/resourceGroups/'resource_group'/providers/Microsoft.Compute/virtualMachines/'name'", 'name' => 'name', 'type' => 'Microsoft.Compute/virtualMachines', 'location' => 'westus', '@platform_update_domain_count' => UPDATE_DOMAIN_COUNT, '@platform_fault_domain_count' => FAULT_DOMAIN_COUNT, '@virtual_machines' => [] } end end end end end
Version data entries
47 entries across 47 versions & 4 rubygems