Record and Zone put requests are idempotent.

This commit is contained in:
Peter Drake 2013-12-30 08:37:30 -05:00
parent 29b789dc9a
commit 17dbaa35f9
2 changed files with 10 additions and 8 deletions

View File

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

View File

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