1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/dns/models/dynect/zones.rb

30 lines
515 B
Ruby
Raw Normal View History

2011-06-16 17:51:13 -04:00
require 'fog/core/collection'
require 'fog/dns/models/dynect/zone'
module Fog
module Dynect
class DNS
class Zones < Fog::Collection
model Fog::Dynect::DNS::Zone
def all
2011-06-17 06:51:37 -04:00
zone_names = connection.list_zones.body["zones"]
load(zone_names.map {|name|
{
"id" => name
2011-06-17 06:51:37 -04:00
}
})
2011-06-16 17:51:13 -04:00
end
def get(zone_id)
2011-06-17 06:58:00 -04:00
new(connection.get_zone(zone_id).body)
2011-06-16 17:51:13 -04:00
end
end
end
end
end