Sha256: a60c80c975a6e06f200cd74d4d2793353dfaed20e9b9f73131f0d92e9affeb63

Contents?: true

Size: 848 Bytes

Versions: 3

Compression:

Stored size: 848 Bytes

Contents

module Fog
  module DNS
    class AzureRM
      # Real class for DNS Request
      class Real
        def delete_record_set(resource_group, name, zone_name, record_type)
          msg = "Deleting Record Set #{name} from Resource Group #{resource_group}."
          Fog::Logger.debug msg
          begin
            @dns_client.record_sets.delete(resource_group, zone_name, name, record_type)
          rescue MsRestAzure::AzureOperationError => e
            raise_azure_exception(e, msg)
          end
          Fog::Logger.debug "Record Set #{name} Deleted Successfully."
          true
        end
      end

      # Mock class for DNS Request
      class Mock
        def delete_record_set(*)
          Fog::Logger.debug 'Record Set name deleted successfully.'
          true
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fog-azure-rm-0.1.1 lib/fog/azurerm/requests/dns/delete_record_set.rb
fog-azure-rm-0.1.0 lib/fog/azurerm/requests/dns/delete_record_set.rb
fog-azure-rm-0.0.9 lib/fog/azurerm/requests/dns/delete_record_set.rb