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

Version Path
fog-azure-rm-0.6.0 lib/fog/azurerm/requests/compute/get_availability_set.rb
fog-azure-rm-0.5.3 lib/fog/azurerm/requests/compute/get_availability_set.rb
fog-azure-rm-0.5.2 lib/fog/azurerm/requests/compute/get_availability_set.rb
far-gem-0.5.6 lib/fog/azurerm/requests/compute/get_availability_set.rb
fog-azure-rm-0.5.1 lib/fog/azurerm/requests/compute/get_availability_set.rb
far-gem-0.5.5 lib/fog/azurerm/requests/compute/get_availability_set.rb
fog-azure-rm-0.5.0 lib/fog/azurerm/requests/compute/get_availability_set.rb
far-gem-0.5.4 lib/fog/azurerm/requests/compute/get_availability_set.rb
far-gem-0.5.3 lib/fog/azurerm/requests/compute/get_availability_set.rb
fog-azure-rm-0.4.9 lib/fog/azurerm/requests/compute/get_availability_set.rb
far-gem-0.5.2 lib/fog/azurerm/requests/compute/get_availability_set.rb
fog-azure-rm-0.4.8 lib/fog/azurerm/requests/compute/get_availability_set.rb
fog-azure-rm-0.4.7 lib/fog/azurerm/requests/compute/get_availability_set.rb
fog-azure-rm-0.4.6 lib/fog/azurerm/requests/compute/get_availability_set.rb
fog-azure-rm-0.4.5 lib/fog/azurerm/requests/compute/get_availability_set.rb
fog-azure-rm-temp-0.0.5 lib/fog/azurerm/requests/compute/get_availability_set.rb
fog-azure-rm-0.4.4 lib/fog/azurerm/requests/compute/get_availability_set.rb
fog-azure-rm-0.4.3 lib/fog/azurerm/requests/compute/get_availability_set.rb
far-gem-0.5.1 lib/fog/azurerm/requests/compute/get_availability_set.rb
fog-azure-rm-0.4.2 lib/fog/azurerm/requests/compute/get_availability_set.rb