Skip to content

Commit

Permalink
Merge pull request fog#550 from mogotest/add_zerigo_record_search
Browse files Browse the repository at this point in the history
Added the ability to search Zerigo records for a particular zone.
  • Loading branch information
geemus committed Oct 9, 2011
2 parents a9d6000 + 38a703e commit 70ebf33
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/fog/zerigo/models/dns/records.rb
Expand Up @@ -34,6 +34,11 @@ def new(attributes = {})
super({ :zone => zone }.merge!(attributes))
end

def find(fqdn)
hosts = connection.find_hosts(fqdn, zone.id).body['hosts']
hosts.collect { |host| new(host) }
end

end

end
Expand Down

0 comments on commit 70ebf33

Please sign in to comment.