2010-12-09 11:51:17 -05:00
|
|
|
module Fog
|
|
|
|
module Slicehost
|
2010-12-21 18:24:14 -05:00
|
|
|
class DNS
|
2010-12-09 11:51:17 -05:00
|
|
|
class Real
|
|
|
|
|
2011-01-07 19:12:04 -05:00
|
|
|
require 'fog/dns/parsers/slicehost/get_zones'
|
2010-12-09 11:51:17 -05:00
|
|
|
|
2010-12-10 11:56:49 -05:00
|
|
|
# Get list of all DNS zones hosted on Slicehost (for this account)
|
2010-12-09 11:51:17 -05:00
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Excon::Response>:
|
2010-12-14 00:04:23 -05:00
|
|
|
# * body<~Hash>:
|
|
|
|
# * 'zones'<~Array>
|
|
|
|
# * 'origin'<~String> - domain name to host (ie example.com)
|
|
|
|
# * 'id'<~Integer> - Id of the zone
|
|
|
|
# * 'ttl'<~Integer> - TimeToLive (ttl) for the domain, in seconds (> 60)
|
|
|
|
# * 'active'<~String> - whether zone is active in Slicehost DNS server - 'Y' or 'N'
|
2010-12-09 11:51:17 -05:00
|
|
|
def get_zones
|
|
|
|
request(
|
|
|
|
:expects => 200,
|
|
|
|
:method => 'GET',
|
2010-12-21 18:24:14 -05:00
|
|
|
:parser => Fog::Parsers::Slicehost::DNS::GetZones.new,
|
2010-12-09 11:51:17 -05:00
|
|
|
:path => 'zones.xml'
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|