2013-05-03 12:31:08 -06:00
|
|
|
module Fog
|
|
|
|
module HP
|
|
|
|
class DNS
|
|
|
|
|
|
|
|
class Real
|
|
|
|
|
2013-10-03 18:54:17 -04:00
|
|
|
# Delete a DNS domain
|
2013-05-03 12:31:08 -06:00
|
|
|
#
|
|
|
|
# ==== Parameters
|
2013-10-03 18:54:17 -04:00
|
|
|
# * domain_id<~String> - UUId of domain to delete
|
2013-05-03 12:31:08 -06:00
|
|
|
#
|
|
|
|
def delete_domain(domain_id)
|
|
|
|
request(
|
|
|
|
:expects => 200,
|
|
|
|
:method => 'DELETE',
|
|
|
|
:path => "domains/#{domain_id}"
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
class Mock
|
|
|
|
def delete_domain(domain_id)
|
|
|
|
response = Excon::Response.new
|
2013-10-03 18:54:17 -04:00
|
|
|
if list_domains.body['domains'].detect { |_| _['id'] == domain_id }
|
2013-05-03 12:31:08 -06:00
|
|
|
response.status = 202
|
|
|
|
response
|
|
|
|
else
|
|
|
|
raise Fog::HP::DNS::NotFound
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|