mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
remove find_by_name for now
This commit is contained in:
parent
7be677403f
commit
113dadd48d
1 changed files with 0 additions and 23 deletions
|
@ -52,29 +52,6 @@ module Fog
|
|||
})
|
||||
end
|
||||
|
||||
def find_by_name(name)
|
||||
requires :zone
|
||||
data = []
|
||||
service.get_all_records(zone.domain, options).body['data'].select{|url| url =~ /\/#{name}\//}.each do |url|
|
||||
(_, _, t, _, fqdn, id) = url.split('/')
|
||||
type = t.gsub(/Record$/, '')
|
||||
|
||||
# leave out the default, read only records
|
||||
next if ['NS', 'SOA'].include?(type)
|
||||
|
||||
record = service.get_record(type, zone.domain, fqdn, 'record_id' => id).body['data']
|
||||
|
||||
data << {
|
||||
:identity => record['record_id'],
|
||||
:fqdn => record['fqdn'],
|
||||
:type => record['record_type'],
|
||||
:rdata => record['rdata']
|
||||
}
|
||||
end
|
||||
|
||||
load(data)
|
||||
end
|
||||
|
||||
def new(attributes = {})
|
||||
requires :zone
|
||||
super({:zone => zone}.merge!(attributes))
|
||||
|
|
Loading…
Reference in a new issue