mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
eb523fb80a
have added each of the Route 53 functions list_hosted_zones is working. rest still need to be tested [aws|linode|slicehost|zerigo|dns] added complete test cases for linode & slicehost DNS. Also added initial support for AWS Route 53
51 lines
1.3 KiB
Ruby
51 lines
1.3 KiB
Ruby
module Fog
|
|
module AWS
|
|
class DNS
|
|
class Real
|
|
|
|
require 'fog/aws/parsers/dns/get_hosted_zone'
|
|
|
|
# retrieve information about a hosted zone
|
|
#
|
|
# ==== Parameters
|
|
# * zone_id<~String> - The ID of the hosted zone
|
|
#
|
|
# ==== Returns
|
|
# * response<~Excon::Response>:
|
|
# * body<~Hash>:
|
|
# * 'HostedZone'<~Hash>:
|
|
# * 'Id'<~String> -
|
|
# * 'Name'<~String> -
|
|
# * 'CallerReference'<~String>
|
|
# * 'Comment'<~String> -
|
|
# * 'NameServers'<~Array>
|
|
# * 'NameServer'<~String>
|
|
# * status<~Integer> - 201 when successful
|
|
def get_hosted_zone( zone_id)
|
|
|
|
# AWS methods return zone_ids that looks like '/hostedzone/id'. Let the caller either use
|
|
# that form or just the actual id (which is what this request needs)
|
|
zone_id = zone_id.sub('/hostedzone/', '')
|
|
|
|
request({
|
|
:expects => 200,
|
|
:parser => Fog::Parsers::AWS::DNS::GetHostedZone.new,
|
|
:method => 'GET',
|
|
:path => "hostedzone/#{zone_id}"
|
|
})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
class Mock
|
|
|
|
def get_hosted_zone()
|
|
Fog::Mock.not_implemented
|
|
end
|
|
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|