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/hp/requests/dns/list_domains.rb
2013-10-30 19:02:30 -04:00

33 lines
No EOL
975 B
Ruby

module Fog
module HP
class DNS
class Real
# List all flavors (IDs and names only)
def list_domains
request(
:expects => [200],
:method => 'GET',
:path => 'domains',
)
end
end
class Mock
def list_domains
response = Excon::Response.new
response.status = 200
response.body = {
"domains" => [
{"name" => "domain1.com.", "created_at" => "2012-11-01T20:11:08.000000", "email" => "nsadmin@example.org", "ttl" => 3600, "serial" => 1351800668, "id" => "09494b72-b65b-4297-9efb-187f65a0553e"},
{"name" => "domain2.com.", "created_at" => "2012-11-01T20:09:48.000000", "email" => "nsadmin@example.org", "ttl" => 3600, "serial" => 1351800588, "id" => "89acac79-38e7-497d-807c-a011e1310438"}
]
}
response
end
end
end
end
end