Sha256: ab0eb4a1720af843ca69d76fdffc0f079e629bdbe38d29fd16fd34ab00aa9252

Contents?: true

Size: 1.1 KB

Versions: 46

Compression:

Stored size: 1.1 KB

Contents

module Fog
  module DNS
    class AzureRM
      # This class is giving implementation of
      # all/get for RecordSets.
      class RecordSets < Fog::Collection
        attribute :resource_group
        attribute :zone_name
        attribute :type

        model Fog::DNS::AzureRM::RecordSet

        def all
          requires :resource_group, :zone_name
          record_sets = []
          service.list_record_sets(resource_group, zone_name).each do |r|
            record_sets << Fog::DNS::AzureRM::RecordSet.parse(r)
          end
          load(record_sets)
        end

        def get(resource_group, name, zone_name, record_type)
          record_set = service.get_record_set(resource_group, name, zone_name, record_type)
          record_set_fog = Fog::DNS::AzureRM::RecordSet.new(service: service)
          record_set_fog.merge_attributes(Fog::DNS::AzureRM::RecordSet.parse(record_set))
        end

        def check_record_set_exists(resource_group, name, zone_name, record_type)
          service.check_record_set_exists(resource_group, name, zone_name, record_type)
        end
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 4 rubygems

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