mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Record and Zone put requests are idempotent.
This commit is contained in:
parent
29b789dc9a
commit
17dbaa35f9
2 changed files with 10 additions and 8 deletions
|
@ -19,10 +19,11 @@ module Fog
|
|||
path = ["#{type}Record", zone, fqdn].join('/')
|
||||
path += "/#{options.delete('record_id')}" if options['record_id']
|
||||
request(
|
||||
:body => Fog::JSON.encode(options),
|
||||
:expects => 200,
|
||||
:method => :put,
|
||||
:path => path
|
||||
:body => Fog::JSON.encode(options),
|
||||
:expects => 200,
|
||||
:idempotent => true,
|
||||
:method => :put,
|
||||
:path => path
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,10 +14,11 @@ module Fog
|
|||
|
||||
def put_zone(zone, options = {})
|
||||
request(
|
||||
:body => Fog::JSON.encode(options),
|
||||
:expects => 200,
|
||||
:method => :put,
|
||||
:path => 'Zone/' << zone
|
||||
:body => Fog::JSON.encode(options),
|
||||
:expects => 200,
|
||||
:idempotent => true,
|
||||
:method => :put,
|
||||
:path => 'Zone/' << zone
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue