# File lib/fog/dynect/models/dns/records.rb, line 12 def all(options = {}) requires :zone data = [] service.get_all_records(zone.domain, options).body['data'].each do |records| (type, list) = records next if %{soa_records ns_records}.include?(type) list.each do |record| data << { :identity => record['record_id'], :fqdn => record['fqdn'], :type => record['record_type'], :rdata => record['rdata'] } end end load(data) end
# File lib/fog/dynect/models/dns/records.rb, line 31 def get(record_id) requires :zone # there isn't a way to look up by just id # must have type and domain for 'get_record' request # so we pick it from the list returned by 'all' list = all list.detect {|e| e.id == record_id} end
Generated with the Darkfish Rdoc Generator 2.