Sha256: 70c45388d8bdf977f884814e43d16a2aa7b79f21eb5cbc22385c14ba91952cb5
Contents?: true
Size: 1.4 KB
Versions: 47
Compression:
Stored size: 1.4 KB
Contents
module Fog module Compute class AzureRM # This class provides the actual implementation for service calls. class Real def list_availability_sets(resource_group) msg = "Listing Availability Sets in Resource Group: #{resource_group}" Fog::Logger.debug msg begin avail_sets = @compute_mgmt_client.availability_sets.list(resource_group) rescue MsRestAzure::AzureOperationError => e raise_azure_exception(e, msg) end Fog::Logger.debug "Listing Availability Sets in Resource Group: #{resource_group} successful." avail_sets.value end end # This class provides the mock implementation for unit tests. class Mock def list_availability_sets(resource_group) [ { 'id' => "/subscriptions/{subscription-id}/resourceGroups/#{resource_group}/providers/Microsoft.Compute/availabilitySets/test_availability_set", 'name' => 'test_availability_set', 'type' => 'Microsoft.Compute/availabilitySets', 'location' => 'westus', 'tags' => {}, 'properties' => { 'platformUpdateDomainCount' => 5, 'platformFaultDomainCount' => 3, 'virtualMachines' => [] } } ] end end end end end
Version data entries
47 entries across 47 versions & 4 rubygems