mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Update create_record.rb
This commit is contained in:
parent
e8655634e4
commit
deccc126ff
1 changed files with 3 additions and 2 deletions
|
@ -2,13 +2,14 @@ module Fog
|
||||||
module HP
|
module HP
|
||||||
class DNS
|
class DNS
|
||||||
class Real
|
class Real
|
||||||
def create_record(domain_id, name, type, data)
|
def create_record(domain_id, name, type, data, priority)
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
:name=> name,
|
:name=> name,
|
||||||
:type=> type,
|
:type=> type,
|
||||||
:data=> data
|
:data=> data
|
||||||
}
|
}
|
||||||
|
data[:priority] = priority.to_i unless priority.nil?
|
||||||
|
|
||||||
request(
|
request(
|
||||||
:body => Fog::JSON.encode(data),
|
:body => Fog::JSON.encode(data),
|
||||||
|
@ -20,7 +21,7 @@ module Fog
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
class Mock
|
class Mock
|
||||||
def create_record(domain_id, name, type, data)
|
def create_record(domain_id, name, type, data, priority)
|
||||||
response = Excon::Response.new
|
response = Excon::Response.new
|
||||||
response.status = 200
|
response.status = 200
|
||||||
data = {
|
data = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue