mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
54 lines
1.8 KiB
Ruby
54 lines
1.8 KiB
Ruby
|
module Fog
|
||
|
module Linode
|
||
|
class Compute
|
||
|
class Real
|
||
|
|
||
|
# Creates a resource record in a domain
|
||
|
#
|
||
|
# ==== Parameters
|
||
|
# * domain_id<~Integer>: limit the list to the domain ID specified
|
||
|
# * type<~String>: One of: NS, MX, A, AAAA, CNAME, TXT, or SRV
|
||
|
# * options<~Hash>
|
||
|
# * name<~String>: The hostname or FQDN. When Type=MX the subdomain to delegate to the
|
||
|
# Target MX server
|
||
|
# * targe<~String> When Type=MX the hostname. When Type=CNAME the target of the alias.
|
||
|
# When Type=TXT the value of the record. When Type=A or AAAA the token
|
||
|
# of '[remote_addr]' will be substituted with the IP address of the request.
|
||
|
# * priority<~Integer>: priority for MX and SRV records, 0-255 - default: 10
|
||
|
# * weight<~Integer>: default: 5
|
||
|
# * port<~Integer>: default: 80
|
||
|
# * protocol<~String>: The protocol to append to an SRV record. Ignored on other record
|
||
|
# types. default: udp
|
||
|
# * ttl_sec<~Integer>: default: 0
|
||
|
# ==== Returns
|
||
|
# * response<~Excon::Response>:
|
||
|
# * body<~Hash>:
|
||
|
# * DATA<~Hash>:
|
||
|
# * 'ResourceID'<~Integer>: ID of the resource record created
|
||
|
def domain_resource_create( domain_id, type, options = {})
|
||
|
|
||
|
query= {}
|
||
|
request(
|
||
|
:expects => 200,
|
||
|
:method => 'GET',
|
||
|
:query => {
|
||
|
:api_action => 'domain.resource.create',
|
||
|
:domainID => domain_id,
|
||
|
:type => type
|
||
|
}.merge!( options)
|
||
|
)
|
||
|
end
|
||
|
|
||
|
end
|
||
|
|
||
|
class Mock
|
||
|
|
||
|
def domain_resource_create( domain_id, type, options = {})
|
||
|
Fog::Mock.not_implemented
|
||
|
end
|
||
|
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|