From 17dbaa35f9108493f4e193c9cd804b8d6c14fef8 Mon Sep 17 00:00:00 2001 From: Peter Drake Date: Mon, 30 Dec 2013 08:37:30 -0500 Subject: [PATCH] Record and Zone put requests are idempotent. --- lib/fog/dynect/requests/dns/put_record.rb | 9 +++++---- lib/fog/dynect/requests/dns/put_zone.rb | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/fog/dynect/requests/dns/put_record.rb b/lib/fog/dynect/requests/dns/put_record.rb index b65513467..7d8c9fd54 100644 --- a/lib/fog/dynect/requests/dns/put_record.rb +++ b/lib/fog/dynect/requests/dns/put_record.rb @@ -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 diff --git a/lib/fog/dynect/requests/dns/put_zone.rb b/lib/fog/dynect/requests/dns/put_zone.rb index 9bd7f0942..817b8cb78 100644 --- a/lib/fog/dynect/requests/dns/put_zone.rb +++ b/lib/fog/dynect/requests/dns/put_zone.rb @@ -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