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/linode/requests/compute/domain_list.rb
Athir Nuaimi 9d2c9ff74c All Linode DNS functions are now supported. Still needs some testing though
Added support for all the DNS resource functions.
As with Slicehost, no mocks or test cases yet.  Also, example code still needs some updating
2010-12-16 00:28:56 -05:00

50 lines
1.2 KiB
Ruby

module Fog
module Linode
class Compute
class Real
# List of domains (you have access to)
#
# ==== Parameters
# * domain_id<~Integer>: limit the list to the domain ID specified
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Array>:
# * DATA<~Array>
# * 'DOMAINID'<~Interger>
# * 'SOA_EMAIL'<~String>
# * 'DESCRIPTION'<~String>
# * 'TTL_SEC'<~String>
# * 'EXPIRE_SEC'<~Integer>
# * 'RETRY_SEC'<~Integer>
# * 'DOMAIN'<~String>
# * 'STATUS'<~Integer>
# * 'MASTER_IPS'<~String>
# * 'REFRESH_SEC'<~Integer>
# * 'TYPE'<~String>
def domain_list(domain_id = nil)
options = {}
if domain_id
options.merge!(:domainId => domain_id)
end
request(
:expects => 200,
:method => 'GET',
:query => { :api_action => 'domain.list' }.merge!(options)
)
end
end
class Mock
def domain_list(domain_id = nil)
Fog::Mock.not_implemented
end
end
end
end
end