1
0
Fork 0
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:
Terry Howe 2013-08-30 11:48:14 -06:00 committed by Rupak Ganguly
parent e8655634e4
commit deccc126ff

View file

@ -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 = {