From 38a703e3e06f59ce2e1ecfc0b7e7b9743cf7372d Mon Sep 17 00:00:00 2001 From: Kevin Menard Date: Sat, 8 Oct 2011 22:39:40 -0400 Subject: [PATCH] Added the ability to search Zerigo records for a particular zone. --- lib/fog/zerigo/models/dns/records.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/fog/zerigo/models/dns/records.rb b/lib/fog/zerigo/models/dns/records.rb index d789129762..a5f8e58004 100644 --- a/lib/fog/zerigo/models/dns/records.rb +++ b/lib/fog/zerigo/models/dns/records.rb @@ -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