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_hosts.rb

48 lines
1.2 KiB
Ruby
Raw Normal View History

module Fog
module Zerigo
class Compute
class Real
require 'fog/zerigo/parsers/compute/list_hosts'
# Get list of all DNS zones hosted on Slicehost (for this account)
#
# ==== Parameters
# * zone_id<~Integer> - the zone ID of the zone from which to get the host records for
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# * 'hosts'<~Hash>
# * 'created-at'<~String>
# * 'data'<~String>
# * 'fqdn'<~String>
# * 'host-type'<~String>
# * 'hostname'<~String>
# * 'id'<~Integer>
# * 'notes'<~String>
# * 'priority'<~Integer>
# * 'ttl'<~Integer>
# * 'updated-at'<~String>
# * 'zone-id'<~String>
def list_hosts( zone_id)
request(
:expects => 200,
:method => 'GET',
:parser => Fog::Parsers::Zerigo::Compute::ListHosts.new,
:path => "/api/1.1/zones/#{zone_id}/hosts.xml"
)
end
end
class Mock
def list_hosts( zone_id)
Fog::Mock.not_implemented
end
end
end
end
end