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/zerigo/requests/compute/list_zones.rb
Athir Nuaimi 15d35d3e0c start of work to support Zerigo DNS service
have defined all the requests in compute.rb
have the 1st request - list_zones working
2010-12-11 20:01:33 -05:00

37 lines
973 B
Ruby

module Fog
module Zerigo
class Compute
class Real
require 'fog/zerigo/parsers/compute/list_zones'
# Get list of all DNS zones hosted on Slicehost (for this account)
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~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'
def list_zones
request(
:expects => 200,
:method => 'GET',
:parser => Fog::Parsers::Zerigo::Compute::ListZones.new,
:path => '/api/1.1/zones.xml'
)
end
end
class Mock
def list_zones
Fog::Mock.not_implemented
end
end
end
end
end