2010-12-14 00:04:23 -05:00
|
|
|
module Fog
|
|
|
|
module AWS
|
|
|
|
class DNS
|
|
|
|
class Real
|
|
|
|
|
2011-01-07 19:12:04 -05:00
|
|
|
require 'fog/dns/parsers/aws/delete_hosted_zone'
|
2010-12-14 00:04:23 -05:00
|
|
|
|
|
|
|
# Delete a hosted zone
|
|
|
|
#
|
|
|
|
# ==== Parameters
|
|
|
|
# * zone_id<~String> -
|
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Excon::Response>:
|
|
|
|
# * body<~Hash>:
|
|
|
|
# * 'ChangeInfo'<~Hash> -
|
|
|
|
# * 'Id'<~String> The ID of the request
|
|
|
|
# * 'Status'<~String> The current state of the hosted zone
|
|
|
|
# * 'SubmittedAt'<~String> The date and time the change was made
|
|
|
|
# * status<~Integer> - 200 when successful
|
2010-12-17 19:48:38 -05:00
|
|
|
def delete_hosted_zone(zone_id)
|
2010-12-14 00:04:23 -05:00
|
|
|
|
|
|
|
# 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::DeleteHostedZone.new,
|
|
|
|
:method => 'DELETE',
|
|
|
|
:path => "hostedzone/#{zone_id}"
|
|
|
|
})
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
class Mock
|
|
|
|
|
2010-12-17 19:48:38 -05:00
|
|
|
def delete_hosted_zone(zone_id)
|
2010-12-14 00:04:23 -05:00
|
|
|
Fog::Mock.not_implemented
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|