Sha256: f219670e82d7c1697025620473692a30ff7613d310af761d8585e4ccc1a27520

Contents?: true

Size: 1.25 KB

Versions: 47

Compression:

Stored size: 1.25 KB

Contents

module Fog
  module DNS
    class AzureRM
      # Real class for DNS Request
      class Real
        def get_zone(resource_group, name)
          msg = "Getting Zone #{name} from Resource Group #{resource_group}."
          Fog::Logger.debug msg
          begin
            zone = @dns_client.zones.get(resource_group, name)
          rescue MsRestAzure::AzureOperationError => e
            raise_azure_exception(e, msg)
          end
          zone
        end
      end

      # Mock class for DNS Request
      class Mock
        def get_zone(*)
          {
            'id' => '/subscriptions/########-####-####-####-############/resourceGroups/resource_group/providers/Microsoft.Network/dnszones/zone_name',
            'name' => 'zone_name',
            'type' => 'Microsoft.Network/dnszones',
            'etag' => '00000003-0000-0000-bd66-02b337a4d101',
            'location' => 'global',
            'tags' => {},
            'properties' =>
              {
                'maxNumberOfRecordSets' => 100_00,
                'nameServers' => nil,
                'numberOfRecordSets' => 2,
                'parentResourceGroupName' => 'resource_group'
              },
            'resource_group' => 'resource_group'
          }
        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/dns/get_zone.rb
fog-azure-rm-0.5.3 lib/fog/azurerm/requests/dns/get_zone.rb
fog-azure-rm-0.5.2 lib/fog/azurerm/requests/dns/get_zone.rb
far-gem-0.5.6 lib/fog/azurerm/requests/dns/get_zone.rb
fog-azure-rm-0.5.1 lib/fog/azurerm/requests/dns/get_zone.rb
far-gem-0.5.5 lib/fog/azurerm/requests/dns/get_zone.rb
fog-azure-rm-0.5.0 lib/fog/azurerm/requests/dns/get_zone.rb
far-gem-0.5.4 lib/fog/azurerm/requests/dns/get_zone.rb
far-gem-0.5.3 lib/fog/azurerm/requests/dns/get_zone.rb
fog-azure-rm-0.4.9 lib/fog/azurerm/requests/dns/get_zone.rb
far-gem-0.5.2 lib/fog/azurerm/requests/dns/get_zone.rb
fog-azure-rm-0.4.8 lib/fog/azurerm/requests/dns/get_zone.rb
fog-azure-rm-0.4.7 lib/fog/azurerm/requests/dns/get_zone.rb
fog-azure-rm-0.4.6 lib/fog/azurerm/requests/dns/get_zone.rb
fog-azure-rm-0.4.5 lib/fog/azurerm/requests/dns/get_zone.rb
fog-azure-rm-temp-0.0.5 lib/fog/azurerm/requests/dns/get_zone.rb
fog-azure-rm-0.4.4 lib/fog/azurerm/requests/dns/get_zone.rb
fog-azure-rm-0.4.3 lib/fog/azurerm/requests/dns/get_zone.rb
far-gem-0.5.1 lib/fog/azurerm/requests/dns/get_zone.rb
fog-azure-rm-0.4.2 lib/fog/azurerm/requests/dns/get_zone.rb